JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 22.08.2016, 12:43
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 347
Default [Event Scripter] Scripts

Convert AAC/M4A/OGG files to MP3.
Code:
// Convert aac/m4a/ogg files to mp3.
// Trigger required: "A Download Stopped".
// Requires ffmpeg/ffprobe. Uses JD ffmpeg/ffprobe settings if available.
// Overwrites destination file (mp3) if it already exists.

if (link.isFinished()) {
    var fileName = link.name.replace(/(.+)(\..+$)/, "$1");
    var fileType = link.name.replace(/(.+)(\..+$)/, "$2");
    var sourceFile = link.getDownloadPath();
    var audioFile = /\.(aac|m4a|ogg)$/.test(sourceFile);

    if (audioFile) {
        var downloadFolder = package.getDownloadFolder();
        var destFile = downloadFolder + "/" + fileName + ".mp3";
        var ffmpeg = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypath");
        var ffprobe = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypathprobe");
        var data = JSON.parse(callSync(ffprobe, "-v", "quiet", "-print_format", "json", "-show_streams", "-show_format", sourceFile));
        var streamsBitrate = data.streams[0].bit_rate ? data.streams[0].bit_rate : 0;
        var formatBitrate = data.format.bit_rate ? data.format.bit_rate : 0;
        var bitrate = Math.max(streamsBitrate, formatBitrate) / 1000;
        var deleteSourceFile = false; // Set this to true to delete source file after conversion.

        if (bitrate > 0) {
            callSync(ffmpeg, "-y", "-i", sourceFile, "-b:a", bitrate + "k", destFile);
            if (deleteSourceFile && getPath(destFile).exists()) deleteFile(sourceFile, false);
        }
    }
}

Last edited by mgpai; 03.09.2016 at 20:45. Reason: Removed text file.
Reply With Quote
  #2  
Old 31.08.2016, 16:20
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 347
Default

Save youtube links and basic information to a html page
Code:
// Save youtube links and basic information to a html page.
// Trigger required: "A Download Stopped"

// Get link property
String.prototype.prop = function() {
    return link.getProperty(this);
};

// Convert duration to hh:mm:ss.ms format
Date.prototype.duration = function() {
    var ms = parseInt((this % 1000) / 100);
    var ss = parseInt((this / 1000) % 60);
    var mm = parseInt((this / (1000 * 60)) % 60);
    var hh = parseInt((this / (1000 * 60 * 60)) % 24);

    hh = (hh < 10) ? "0" + hh : hh;
    mm = (mm < 10) ? "0" + mm : mm;
    ss = (ss < 10) ? "0" + ss : ss;

    return hh + ":" + mm + ":" + ss + "." + ms;
};

// Get media bitrate
Number.prototype.toKbps = function() {
    return ((this / mediaDuration) * 8).toFixed(2);
};

// youtube media check
var youtubeMedia = link.getHost() == "youtube.com" && (/\.(m4a|aac|ogg|mp3|mp4|webm)$/).test(link.getName());

// Get Data
if (youtubeMedia) {
    var output = [];
    var variant = JSON.parse("YT_VARIANT".prop());
    var variantData = JSON.parse(variant.data);
    var youtube = "<a href=\"**External links are only visible to Supporters**;
    var saveFile = link.getDownloadPath() + ".info.html";
    var fileSize = link.getBytesTotal();
    var demux = (/DEMUX/).test(variant.id);
    var audioSize = !demux ? "DASH_AUDIO_SIZE".prop() : fileSize;
    var videoSize = "DASH_VIDEO_SIZE".prop();
    var mediaDuration = "YT_DURATION".prop();
    var data = {
        Video: youtube + "watch?v=" + "YT_ID".prop() + "\">" + "YT_TITLE".prop() + "</a>",
        Playlist: "YT_PLAYLIST_ID".prop() && "YT_PLAYLIST_TITLE".prop() ? youtube + "playlist?list=" + "YT_PLAYLIST_ID".prop() + "\">" + "YT_PLAYLIST_TITLE".prop() + "</a>" : null,
        User: youtube + "user/" + "YT_USER_NAME".prop() + "\">" + "YT_USER_NAME".prop() + "</a>",
        Channel: youtube + "channel/" + "YT_CHANNEL_ID".prop() + "\">" + "YT_CHANNEL".prop() + "</a>" + "\r\n",
        Published: new Date("YT_DATE".prop()).toDateString(),
        Size: (fileSize / 1048576).toFixed(2) + " MiB",
        Duration: new Date(mediaDuration).duration(),
        Width: variantData.width,
        Height: variantData.height,
        FPS: variantData.fps,
        Audio_Bitrate: audioSize.toKbps() + " kbps",
        Video_Bitrate: !demux && fileSize > audioSize ? videoSize.toKbps() + " kbps" : null,
        Overall_Bitrate: !demux && fileSize > audioSize ? fileSize.toKbps() + " kbps" : null,
        Variant_ID: variant.id,
    };
    // Generate output[]
    for (i in data) {
        if (data[i] && data[i] != -1) {
            output.push(i.replace(/_/g, " ") + " : " + data[i]);
        }
    }
    // Format output[] and save to html file
    try {
        deleteFile(saveFile, false); // Delete info file if it already exists on the disk.
        writeFile(saveFile, "<pre>" + output.join("<br>") + "</pre>", false);
    } catch (err) {
        log(err + "");
    }
}
Attached Files
File Type: html Sample_Output.html (717 Bytes, 86 views)

Last edited by mgpai; 03.09.2016 at 20:45. Reason: Removed text file.
Reply With Quote
  #3  
Old 02.09.2016, 13:57
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 347
Default

Extraction Scheduler
Code:
// Schedule Extraction
// Trigger Required: Interval
// Disable Auto Extract in Archive Extractor
// Forum Topic: https://board.jdownloader.org/showthread.php?t=70655

var t = [21, 30]; //Set Starting Time [hours,minutes] e.g. [21,30] is 9:30 PM

if ((new Date().setHours(t[0], t[1], 0, 0) % new Date() < interval)) {
    var links = getAllDownloadLinks();

    for (i = 0; i < links.length; i++) {
        var link = links[i];
        var autoExtract = link.getArchive().getInfo().autoExtract;

        if (link.isFinished() && link.getArchive() && link.getExtractionStatus() == null && autoExtract != "FALSE") {
            callAPI("extraction", "startExtractionNow", [link.getUUID()], []);
        }
    }
}


Rewritten:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/Taobaibai.js

Last edited by mgpai; 22.02.2018 at 18:00. Reason: Added link to rewritten script
Reply With Quote
  #4  
Old 06.09.2016, 15:22
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 347
Default

Update JD when idle.
Code:
// Restart and Update JD when idle
// Trigger Required: "Interval"

var newInterval = 600000;

if (interval == newInterval) {
    if (isDownloadControllerIdle()) {
        if (isUpdateAvailable() && !isExtracting() && !isCrawling()) {
            restartAndUpdate();
        } else {
            if (!isAutoUpdateCheckEnabled()) {
                runUpdateCheck();
            }
        }
    }
} else {
    interval = newInterval;
}

//Functions

function isUpdateAvailable() {
    return callAPI("update", "isUpdateAvailable");
}

function isExtracting() {
    return callAPI("extraction", "getQueue").length > 0;
}

function isCrawling() {
    return callAPI("linkcrawler", "isCrawling");
}

function restartAndUpdate() {
    callAPI("update", "restartAndUpdate");
}

function isAutoUpdateCheckEnabled() {
    return callAPI("config", "get", "org.jdownloader.updatev2.UpdateSettings", null, "autoupdatecheckenabled");
}

function runUpdateCheck() {
    callAPI("update", "runUpdateCheck");
}

Last edited by mgpai; 07.09.2016 at 13:55. Reason: Optimized the script
Reply With Quote
  #5  
Old 10.09.2016, 12:51
DoctorD90 DoctorD90 is offline
Modem User
 
Join Date: Sep 2016
Posts: 1
Default md5sum

Generate md5 hash file in download folder
Code:
// Generate md5 hash file in download folder
// Trigger: "A Download Stopped"
// Latest updates: https://raw.githubusercontent.com/DoctorD90/jd_scripts/master/md5
// Credits: mgpai

if (link.isFinished()) {
	var filename = link.getName()
	var file = link.getDownloadPath()
	var folder = link.package.getDownloadFolder()
	var hashfile = folder + "/" + filename + "\.md5"
	if (getPath(hashfile).exists()) getPath(hashfile).delete()
	var MD5text = getChecksum("md5", file).toLowerCase() + "\t" + filename + "\n"
	writeFile(hashfile, MD5text, true)
}

Last edited by DoctorD90; 10.09.2016 at 13:29.
Reply With Quote
  #6  
Old 22.02.2018, 00:31
Taobaibai Taobaibai is offline
Junior Loader
 
Join Date: Oct 2015
Posts: 14
Default

Quote:
Originally Posted by mgpai View Post
Extraction Scheduler
Code:
// Schedule Extraction
// Trigger Required: Interval
// Disable Auto Extract in Archive Extractor
// Forum Topic: https://board.jdownloader.org/showthread.php?t=70655

var t = [21, 30]; //Set Starting Time [hours,minutes] e.g. [21,30] is 9:30 PM

if ((new Date().setHours(t[0], t[1], 0, 0) % new Date() < interval)) {
    var links = getAllDownloadLinks();

    for (i = 0; i < links.length; i++) {
        var link = links[i];
        var autoExtract = link.getArchive().getInfo().autoExtract;

        if (link.isFinished() && link.getArchive() && link.getExtractionStatus() == null && autoExtract != "FALSE") {
            callAPI("extraction", "startExtractionNow", [link.getUUID()], []);
        }
    }
}



Doesn't work for me? Is there an update?
Reply With Quote
  #7  
Old 29.09.2016, 15:01
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 347
Default

Split packages and create sub-folders

Adding custom command to context menu
  1. Add script to event scripter
  2. Go to Linkgrabber Tab > Context Menu > Open Menu Manager
  3. Add Submenu > Name it "Scripts" (can specify any name)
  4. Select "Scripts" Submenu > Add Action > EventScripter Trigger
  5. In the right-side panel change the name from "EventScripter Trigger" to "Split Packages" (Exact name specified in the script, case-sensitive)
  6. Save
Code:
// Split Packages and create sub-folder based on package length
// Trigger : Linkgrabber Contextmenu Button Pressed
// Forum Topic: https://board.jdownloader.org/showthread.php?t=70979

if (name == "Split Packages") {
    var package = lgSelection.getContextPackage();
    var links = package.getDownloadLinks();
    var newSize = 100; // Specify max number of links per package
    var UUIDS = [];
    var count = 1;

    if (links.length > newSize) {
        for (i = 0; i < links.length; i++) {
            var link = links[i];
            UUIDS.push(link.getUUID());
        }

        while (UUIDS.length) {
            var oldFolder = package.getDownloadFolder();
            var packageName = package.getName();
            var splitUUIDS = UUIDS.splice(0, newSize);
            var newFolder = oldFolder + "/" + pad(count);
            setNewFolder();
            count++;
        }
    }
}

// Add sub folder
function setNewFolder() {
    callAPI("linkgrabberv2", "movetoNewPackage", splitUUIDS, [], packageName, newFolder);
}

// Pad number with leading zeros
function pad(num) {
    var a = num + "";
    var b = (links.length / newSize).toFixed(0);
    while (a.length < b.length) a = "0" + a;
    return a;
}
Reply With Quote
  #8  
Old 07.10.2016, 14:52
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 347
Default

Simple history of downloaded links in text format.
  • Default folder: "<jdownloader>\auto\history" (e.g "c:\jdownloader\auto\history")
  • Default file name: "<current date>.txt" (e.g. "Oct 07 2016.txt")
Code:
// Simple history
// Trigger Required : A Download Stopped

if (link.isFinished()) {
    var a /*date*/ = new Date().toString().substring(4, 16);
    var b /*history folder*/ = JD_HOME + "/auto/history/";
    var c /*history file Name */ = a + ".txt";
    var d /*download url*/ = link.getContentURL();
    var e /*download file name*/ = link.getName();

    if (!getPath(b).exists()) getPath(b).mkdirs();
    writeFile(b + c, [d, e].join(",") + "\r\n", true);
}
Reply With Quote
  #9  
Old 17.10.2016, 13:59
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 347
Default

Hide/Unhide Infobar Window

Adding custom command to Tray menu
  • Add script to event scripter
  • Tray Menu > Open Menu Manager > Add Action > EventScripter Trigger
  • In the right-side panel, change the name from "EventScripter Trigger" to "Infobar" (Exact name - without quotes - as specified in the script, case-sensitive)
  • Change Icon (Optional)
  • Save
Code:
// Hide/Unhide Infobar Window
// Trigger: Traymenu Button Pressed
// Can also use other 'button pressed' triggers if you want to specify/use 'keyboard shortcut'
// Requirements: Install and enable infobar extension
// Forum Topic: https://board.jdownloader.org/showthread.php?t=70617

if (name = "Infobar") {
    var infobar = "org.jdownloader.extensions.infobar.InfoBarConfig";
    var storage = "cfg/org.jdownloader.extensions.infobar.InfoBarExtension";
    var windowVisible = callAPI("config", "get", infobar, storage, "windowvisible");

    if (windowVisible) {
        callAPI("config", "set", infobar, storage, "windowvisible", false);
    } else {
        callAPI("config", "set", infobar, storage, "windowvisible", true);
    }
}

Last edited by mgpai; 18.10.2016 at 11:56. Reason: Modified scrtipt to Hide/Unhide Infobar Window instead of Enable/Disable Infobar Extension
Reply With Quote
  #10  
Old 11.11.2016, 01:03
Spongshga's Avatar
Spongshga Spongshga is offline
JD Legend
 
Join Date: Apr 2009
Location: web
Posts: 1,162
Default

Quote:
Originally Posted by mgpai View Post
Simple history of downloaded links in text format.
  • Default folder: "<jdownloader>\auto\history" (e.g "c:\jdownloader\auto\history")
  • Default file name: "<current date>.txt" (e.g. "Oct 07 2016.txt")
Code:
// Simple history
// Trigger Required : A Download Stopped

if (link.isFinished()) {
    var a /*date*/ = new Date().toString().substring(4, 16);
    var b /*history folder*/ = JD_HOME + "/auto/history/";
    var c /*history file Name */ = a + ".txt";
    var d /*download url*/ = link.getContentURL();
    var e /*download file name*/ = link.getName();

    if (!getPath(b).exists()) getPath(b).mkdirs();
    writeFile(b + c, [d, e].join(",") + "\r\n", true);
}
Was muss ich ändern um einen Außerhalb des JD-Verzeichniss liegenden Speicher-Pfad anzugeben?
Falls im Beitrag ergrenzt kann dieser Post gelöscht werden :-)


@Administratoren:
Wäre es nicht schlecht für kommende Scripts ein extra Foren-bereich einzurichten und für jeden Script ein Thema zu erstellen. Dann noch ein Verweis via URL im JD in der Script-Erweiterung auf den Foren bereich... Scheint künftig übersichtlicher und Interessanter oder?

Klasse wärs, wenn genannte Scripte bei "Beispielen im JD auftauchen würden und ggf. die außenstehenden Infos im Script dokumentiert werden sodass sie funktionstüchtig laufen. Beispielsweise wie [...] Default folder: "< [...] Oder eben der Hinweis via URL.
__________________
sorry about my gramma (dyslexia).
———————————————————————————————————
SuFu/Google: Inoffizielle JDownloader Plugins, Erweiterungen, Addons & Tools

Last edited by Spongshga; 11.11.2016 at 01:09.
Reply With Quote
  #11  
Old 11.11.2016, 02:54
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 347
Default

Quote:
Originally Posted by Spongshga View Post
Was muss ich ändern um einen Außerhalb des JD-Verzeichniss liegenden Speicher-Pfad anzugeben?
Falls im Beitrag ergrenzt kann dieser Post gelöscht werden :-)
Example:

Code:
var b /*history folder*/ = "c:/myFolder/history/";

Note: Path should always include "/" at the end.
Reply With Quote
  #12  
Old 11.11.2016, 03:22
Informativ Informativ is offline
Giga Loader
 
Join Date: Nov 2016
Posts: 96
Default

Hello mgpai,
i have crawljob white description inside. Is it possible to write this in txt file and do in downloadfolder? I have no idea how to implement this.
regards

https://board.jdownloader.org/showthread.php?t=71524
Reply With Quote
  #13  
Old 10.11.2016, 20:19
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 347
Default

EDIT by psp: Thank you mgpai - I've removed my request- post above this one to keep the thread clean!

Code:
// Add single URL at user defined interval
// Trigger required: "Interval"

var setInterval = 60; // in minutes
var link = "http://jdownloader.org/download/index"; // Specify URL to be added

if (interval == setInterval * 60 * 1000) {
    callAPI("linkgrabberv2", "addLinks", {
        "deepDecrypt": true,
        "links": link
    });
} else {
    interval = setInterval * 60 * 1000;
}
Code:
// Add multiple URLs at user defined interval
// Trigger required: "Interval"

var setInterval = 60; // in minutes
var feeds = JD_HOME + "/feeds/links.txt"; // Full path to text file containing the urls

if (interval == setInterval * 60 * 1000) {
    callAPI("linkgrabberv2", "addLinks", {
        "deepDecrypt": true,
        "links": readFile(feeds)
    });
} else {
    interval = setInterval * 60 * 1000;
}
File used to test the script:
Attached Files
File Type: txt links.txt (74 Bytes, 56 views)

Last edited by pspzockerscene; 11.11.2016 at 03:36.
Reply With Quote
  #14  
Old 14.11.2016, 13:19
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 58,893
Default

You cannot use multiple comment lines!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #15  
Old 16.11.2016, 14:48
Trialer03 Trialer03 is offline
Junior Loader
 
Join Date: May 2009
Posts: 13
Default sorry, failed to set new value

I become the message:

sorry, failed to set new value

what is here wrong?
Reply With Quote
  #16  
Old 16.11.2016, 15:46
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 58,893
Default

Can you please provide screenshots/example what you want to set?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #17  
Old 17.11.2016, 17:23
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 347
Default

Replace 128kbit audio with 192kbit audio in 1080p youtube videos
  • The 1080p video file and 192kbit audio file must be placed in the same package and the package must contain only those two files.
  • Sometimes the actual bitrate of the downloaded audio file can be less than the bitrate stated in the variant. In "Advanced Settings", enable "Youtube.doextendedaudiobitratelookupenabled", to detect the actual audio bitrate before the file is downloaded.
Code:
// Replace 128kbit audio with 192kbit audio in 1080p youtube videos
// Trigger Required: "Package Finished"
// Forum Topic: https://board.jdownloader.org/showthread.php?t=69971

var links = package.getDownloadLinks();

if (links.length == 2) {
    var video = false;
    var audio = false;

    for (i = 0; i < links.length; i++) {
        var link = links[i];
        if (link.getHost() == "youtube.com") {
            var file = link.getDownloadPath();
            var variant = JSON.parse(link.getProperty("YT_VARIANT")).id;
            if ((/DEMUX.+192KBIT/i).test(variant)) {
                audio = file;
                var audioURL = link.getContainerURL();
            }
            if ((/1080P.+128KBIT/i).test(variant)) {
                video = file;
                var videoURL = link.getContainerURL();
                var out = (/128/).test(file) ? file.replace(/128/, "192") : file.replace(/(.+)(\..+)/, "$1 (192kbit Audio)$2");
            }
        }
    }

    if (video && audio && videoURL == audioURL) {
        var ffmpeg = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypath");
        callSync(ffmpeg, "-i", video, "-i", audio, "-c", "copy", "-map", "0:v:0", "-map", "1:a:0", out);
    }
}

Last edited by mgpai; 17.11.2016 at 18:21. Reason: Added fallback method for 'output' file name
Reply With Quote
  #18  
Old 25.11.2016, 14:04
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 347
Default

Export download URLs (Linkgrabber List)
  • Default folder: "<jdownloader>\auto\history" (e.g "c:\jdownloader\auto\export")
  • Default file name: "<timestamp> - LG Selection.txt" (e.g. "Nov 25 2016 17.26.44 - LG Selection.txt")
Code:
// Export download URLs
// Trigger : "Linkgrabber Contextmenu Button Pressed"

if (name == "Export URLs") {
    var exportFolder = JD_HOME + "/auto/export/"; // <- Folder for exporting the text files
    var now = new Date().toString().substring(4, 24).replace(/:/g, "."); // <- Timestamp used in file name
    var exportFile = now + " - LG Selection.txt"; // <- Filename for exporting the URLs
    var links = lgSelection.getLinks();
    var urls = [];

    for (i = 0; i < links.length; i++) {
        var link = links[i];
        var fileName = link.getName();
        var downloadURL = link.getContentURL();
        urls.push(downloadURL + "," + fileName);
    }

    if (!getPath(exportFolder).exists()) getPath(exportFolder).mkdirs();
    writeFile(exportFolder + exportFile, urls.join("\r\n"), true);
}

Export Download URLs (Download List)
  • Default folder: "<jdownloader>\auto\history" (e.g "c:\jdownloader\auto\export")
  • Default file name: "<timestamp> - DL Selection.txt" (e.g. "Nov 25 2016 17.26.44 - DL Selection.txt")
Code:
// Export download URLs
// Trigger : "DownloadList Contextmenu Button Pressed"

if (name == "Export URLs") {
    var exportFolder = JD_HOME + "/auto/export/"; // <- Folder for exporting the text files
    var now = new Date().toString().substring(4, 24).replace(/:/g, "."); // <- Timestamp used in file name
    var exportFile = now + " - DL Selection.txt"; // <- Filename for exporting the URLs
    var links = dlSelection.getDownloadLinks();
    var urls = [];

    for (i = 0; i < links.length; i++) {
        var link = links[i];
        var fileName = link.getName();
        var downloadURL = link.getContentURL();
        urls.push(downloadURL + "," + fileName);
    }

    if (!getPath(exportFolder).exists()) getPath(exportFolder).mkdirs();
    writeFile(exportFolder + exportFile, urls.join("\r\n"), true);
}
Reply With Quote
  #19  
Old 13.03.2018, 21:09
patriks patriks is offline
Vacuum Cleaner
 
Join Date: Aug 2017
Location: Brasil
Posts: 15
Default

Quote:
Originally Posted by mgpai View Post
Export download URLs (Linkgrabber List)

Export Download URLs (Download List)
  • Default folder: "<jdownloader>\auto\history" (e.g "c:\jdownloader\auto\export")
  • Default file name: "<timestamp> - DL Selection.txt" (e.g. "Nov 25 2016 17.26.44 - DL Selection.txt")
Code:
// Export download URLs
// Trigger : "DownloadList Contextmenu Button Pressed"

if (name == "Export URLs") {
    var exportFolder = JD_HOME + "/auto/export/"; // <- Folder for exporting the text files
    var now = new Date().toString().substring(4, 24).replace(/:/g, "."); // <- Timestamp used in file name
    var exportFile = now + " - DL Selection.txt"; // <- Filename for exporting the URLs
    var links = dlSelection.getDownloadLinks();
    var urls = [];

    for (i = 0; i < links.length; i++) {
        var link = links[i];
        var fileName = link.getName();
        var downloadURL = link.getContentURL();
        urls.push(downloadURL + "," + fileName);
    }

    if (!getPath(exportFolder).exists()) getPath(exportFolder).mkdirs();
    writeFile(exportFolder + exportFile, urls.join("\r\n"), true);
}
mgpai, I'm testing this script, but not work, no error message. Did I do something wrong?


I tested the linkgrabber version too, and it did not work.
Reply With Quote
  #20  
Old 14.03.2018, 11:11
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 347
Default

Quote:
Originally Posted by patriks View Post
... is it possible to make the script ignore and delete the duplicate links?
Script Updated:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/patriks.js

Quote:
Originally Posted by patriks View Post
I'm testing this script, but not work, no error message. Did I do something wrong?
Have you renamed "EventScripter Trigger" to "Export URLs"? The button name in context menu should be the same as the one used in script.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 09:40.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.