├── README.md └── jdownloader ├── eventscripter └── scripts │ ├── 44nonymous.js │ ├── Biohazmatz.js │ ├── DJwa163.js │ ├── DaDealer.js │ ├── FlyAway.js │ ├── Hartm.js │ ├── Hartm_2.js │ ├── LuckyLuciano.js │ ├── Takhen.js │ ├── Taobaibai.js │ ├── Taobaibai_2.js │ ├── Tedolly.js │ ├── Tom.js │ ├── YenForYang.js │ ├── aiimaim.js │ ├── aiimaim_2.js │ ├── animus.js │ ├── desperado591.js │ ├── desperado591_2.js │ ├── dpinbsp.js │ ├── dxzdxz1.js │ ├── ehorn.js │ ├── flopodopo.js │ ├── guardao.js │ ├── guardao_2.js │ ├── netgearjd.js │ ├── netgearjd_2.js │ ├── patriks.js │ ├── patriks_2.js │ ├── patriks_3.js │ ├── peymanch.js │ ├── rednoah.js │ └── serrato.js ├── link_crawler └── rules │ └── rulereaper1911.json ├── linkgrabber_filter └── filters │ └── filtersreaper1911.filter └── packagizer └── rules ├── reaper1911.packagizer └── thekalinga.packagizer /README.md: -------------------------------------------------------------------------------- 1 | # resources -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/44nonymous.js: -------------------------------------------------------------------------------- 1 | // Run external program when all packages finished 2 | // Trigger: Download Controller Stopped 3 | // Forum Post: https://board.jdownloader.org/showpost.php?p=425864&postcount=473 4 | 5 | var allPackagesFinished = getAllFilePackages().every(function(package) { 6 | return package.isFinished(); 7 | }); 8 | 9 | if (allPackagesFinished) callAsync(null, "C:/Programs/P2P/uTorrent/utorrent.exe"); 10 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/Biohazmatz.js: -------------------------------------------------------------------------------- 1 | // Pause downloads during extraction 2 | // Trigger Required: Any Extraction Event 3 | // Enable "Synchrounous Execution" checkbox in the top panel 4 | // Related Post: https://board.jdownloader.org/showpost.php?p=421379&postcount=398 5 | 6 | (function() { 7 | if (!isDownloadControllerRunning()) return; 8 | if (!callAPI("extraction", "getQueue").length) return; 9 | if (!isDownloadControllerPaused()) setDownloadsPaused(true); 10 | while (callAPI("extraction", "getQueue").length) sleep(1000); 11 | if (isDownloadControllerPaused()) setDownloadsPaused(false); 12 | })(); 13 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/DJwa163.js: -------------------------------------------------------------------------------- 1 | // Replace characters in file name 2 | // Trigger: Packagizer Hook 3 | // Forum Topic: https://board.jdownloader.org/showthread.php?t=77989 4 | 5 | var fn = link.getName(); 6 | var re = /[+_-]/g; 7 | 8 | if (re.test(fn)) link.setName(fn.replace(re, " ").replace(/\s+/g, " ")); 9 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/DaDealer.js: -------------------------------------------------------------------------------- 1 | // Update when Idle 2 | // Trigger Required: "Interval" 3 | // Set interval to 60000 (60 seconds) or more 4 | // Related Post: https://board.jdownloader.org/showpost.php?p=417592&postcount=294 5 | 6 | if (readyForUpdate()) callAPI("update", "restartAndUpdate"); 7 | 8 | // Functions 9 | function readyForUpdate() { 10 | if (interval < 60000) return; 11 | if (!callAPI("update", "isUpdateAvailable")) return; 12 | if (!isDownloadControllerIdle()) return; 13 | if (callAPI("linkcrawler", "isCrawling")) return; 14 | if (callAPI("linkgrabberv2", "isCollecting")) return; 15 | if (callAPI("extraction", "getQueue").length > 0) return; 16 | return true; 17 | } 18 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/FlyAway.js: -------------------------------------------------------------------------------- 1 | // Reconnect if all downloads have been running for at least one minute, and the average (global) download speed is below user specified speed 2 | // Target Required: "Interval" (Set interval to 30000 or more) 3 | // Important: Enable "Synchronous Execution" checkbox in top panel 4 | // Forum Post: https://board.jdownloader.org/showpost.php?p=422375&postcount=416 5 | 6 | var minSpeed = 400; // <- Set minimum speed in KiB/s 7 | 8 | (function() { 9 | if (interval < 30000) return; 10 | if (!isSynchronous) return; 11 | var links = getRunningDownloadLinks(); 12 | if (!links.length) return; 13 | if (getAverageSpeed() > minSpeed * 1024) return; 14 | if (links.some(function(link) { 15 | return link.getDownloadDuration() < 60000; 16 | })) return; 17 | doReconnect(); 18 | })(); 19 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/Hartm.js: -------------------------------------------------------------------------------- 1 | // Pause ond resume downloads if average speed is below target speed 2 | // Trigger required: "Interval" 3 | // Set Interval to 60000 (60 seconds) or more 4 | // Related Post: https://board.jdownloader.org/showpost.php?p=417341&postcount=281 5 | 6 | var targetSpeed = 1024; // <- Set target speed in KiB/s 7 | var delay = 5; // <- Set delay (in seconds) between pause and resume 8 | 9 | if (interval >= 60000 && getRunningDownloadLinks().length && getAverageSpeed() < targetSpeed * 1024) { 10 | setDownloadsPaused(true); 11 | sleep(delay * 1000); 12 | setDownloadsPaused(false); 13 | } 14 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/Hartm_2.js: -------------------------------------------------------------------------------- 1 | // Stop and restart all downloads if average speed is below target speed 2 | // Target Required: "Interval" 3 | // Set interval to 30000 (30 seconds) or more 4 | // Related Topic: https://board.jdownloader.org/showpost.php?p=417730&postcount=299 5 | 6 | var targetSpeed = 1024; // <- Set target speed in KiB/s 7 | var minDuration = 30; // <- Set the minimum duraton (in seconds) a download must be running in order to consider it as started 8 | 9 | var links = interval >= 30000 ? getRunningDownloadLinks() : []; 10 | var slowSpeed = links.length ? getAverageSpeed() < targetSpeed * 1024 : false; 11 | 12 | if (slowSpeed && allStarted()) { 13 | stopDownloads(); 14 | while (!isDownloadControllerIdle()) sleep(1000); 15 | startDownloads(); 16 | } 17 | 18 | //Functions 19 | function allStarted() { 20 | return links.every(function(link) { 21 | return link.getDownloadDuration() > minDuration * 1000; 22 | }); 23 | } 24 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/LuckyLuciano.js: -------------------------------------------------------------------------------- 1 | // Add Playlist Position to file name 2 | // Trigger: Downloadlist Contextmenu Button Pressed 3 | // Related topic: https://board.jdownloader.org/showthread.php?t=78778 4 | // Customize download list context menu > Add a new "EventScript Trigger" button > Rename it to "Add Playlist Position" (without quotes, case-sensitive) 5 | 6 | if (name == "Add Playlist Position") { 7 | var downloadLinks = dlSelection.getDownloadLinks(); 8 | downloadLinks.forEach(function(link) { 9 | pos = link.getProperty("YT_PLAYLIST_INT"); 10 | if (pos) link.setName(("0000" + pos).slice(-4) + " - " + link.getName()); 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/Takhen.js: -------------------------------------------------------------------------------- 1 | // Disable download link, if file exists in download folder/subfolders 2 | // Trigger required: A Download Started 3 | 4 | var list; 5 | 6 | var onDisk = getAllChildren(link.getPackage().getDownloadFolder()).some(function(path) { 7 | return link.isRunning() && getPath(path).getName() == link.getName(); 8 | }); 9 | 10 | if (onDisk) link.setEnabled(false); 11 | 12 | // Function 13 | function getAllChildren(path) { 14 | list = list || []; 15 | getPath(path).getChildren().forEach(function(path) { 16 | path.isFile() ? list.push(path) : list.concat(getAllChildren(path)); 17 | }); 18 | return list 19 | } 20 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/Taobaibai.js: -------------------------------------------------------------------------------- 1 | // Schedule Extraction 2 | // Trigger Required: Interval 3 | // In "Archive Extractor" settings, disable the "Extract archives after download (default value)" checkbox 4 | // Related Post: https://board.jdownloader.org/showpost.php?p=418683&postcount=341 5 | 6 | var t = [18, 00]; // <- Specify time (24HRS format) to start the extraction 7 | var run = new Date().setHours(t[0], t[1], 0, 0) % new Date() < interval; 8 | 9 | if (run) getAllDownloadLinks().forEach(function(link) { 10 | if (!link.getArchive()) return; 11 | if (!link.isFinished()) return; 12 | if (link.getExtractionStatus() != null) return; 13 | if (link.getArchive().getInfo().autoExtract == false) return; 14 | callAPI("extraction", "startExtractionNow", [link.getUUID()], []); 15 | }); 16 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/Taobaibai_2.js: -------------------------------------------------------------------------------- 1 | // Extract archives after all packages have finished 2 | // Trigger Required: Package Finished 3 | // In "Archive Extractor" settings, disable the "Extract archives after download (default value)" checkbox 4 | // Related Post: https://board.jdownloader.org/showpost.php?p=418712&postcount=345 5 | 6 | if (allPackagesFinished()) startExtraction(); 7 | 8 | // Functions 9 | function allPackagesFinished() { 10 | return getAllFilePackages().every(function(package) { 11 | return package.isFinished(); 12 | }); 13 | } 14 | 15 | function startExtraction() { 16 | getAllDownloadLinks().forEach(function(link) { 17 | if (!link.getArchive()) return; 18 | if (!link.isFinished()) return; 19 | if (link.getExtractionStatus() != null) return; 20 | if (link.getArchive().getInfo().autoExtract == false) return; 21 | callAPI("extraction", "startExtractionNow", [link.getUUID()], []); 22 | }); 23 | } 24 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/Tedolly.js: -------------------------------------------------------------------------------- 1 | // Play sound when new links added (per job) 2 | // Trigger: Remote API Event fired 3 | // Forum Topic: https://board.jdownloader.org/showthread.php?t=77649 4 | 5 | (function() { 6 | if (event.publisher != "linkcrawler") return; 7 | if (event.id != "STOPPED") return; 8 | if (!JSON.parse(event.data).links) return; 9 | playWavAudio(JD_HOME + "/themes/standard/org/jdownloader/sounds/captcha.wav"); 10 | })(); 11 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/Tom.js: -------------------------------------------------------------------------------- 1 | // Convert dts to ac3 and create new video file 2 | // Trigger Required: A new file has been created 3 | // Forum Topic: https://board.jdownloader.org/showpost.php?p=427834&postcount=489 4 | 5 | var ffmpeg = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypath"); 6 | var ffprobe = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypathprobe"); 7 | 8 | files.forEach(function(file) { 9 | if (getPath(file).getLinkInfo().group != "VideoExtensions") return; 10 | if (callSync(ffprobe, "-i", file).indexOf("Audio: dts") == -1) return; 11 | var ext = getPath(file).getExtension(); 12 | callAsync(function(error) { 13 | if (!error) getPath(file).delete(); 14 | }, ffmpeg, "-i", file, "-map", "0", "-vcodec", "copy", "-scodec", "copy", "-acodec", "ac3", "-b:a", "640k", file.replace(ext, "-ac3." + ext)); 15 | }); 16 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/YenForYang.js: -------------------------------------------------------------------------------- 1 | // When package is removed, do something with the extraction folders of each archive in that package 2 | // Trigger : Package Finished 3 | // Forum Topic: https://board.jdownloader.org/showpost.php?p=421828&postcount=5 4 | 5 | var extractionFolders = package.getDownloadLinks().map(function(link) { 6 | var archive = link.getArchive(); 7 | if (archive) return link.getArchive().getExtractToFolder(); 8 | }); 9 | 10 | while (packageExists()) sleep(1000); 11 | 12 | extractionFolders.forEach(function(extractionFolder) { 13 | /* Do something with each extraction folder */ 14 | /* if (extractionFolder) callAsync(null, program, extractionFolder); */ 15 | }); 16 | 17 | //Function 18 | function packageExists() { 19 | return getAllFilePackages().some(function(filePackage) { 20 | return filePackage.equals(package); 21 | }); 22 | } 23 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/aiimaim.js: -------------------------------------------------------------------------------- 1 | // Disable Auto reconnect for user specified period, if downloads fail to start/resume (no bytes downloaded) after an IP change. 2 | // Trigger Required: Interval 3 | // Set Interval to 60000 (60 Seconds) 4 | // Important: Enable "Synchronous execution of script" checkbox in top panel 5 | // Related Topic: https://board.jdownloader.org/showthread.php?t=76639 6 | 7 | var checkDuration = 5; // <- Period (in minutes) for which the downloaed bytes will be calculated after an IP change is detected 8 | var disableDuration = 60; // <- Set duration( in minutes) for which the auto reconnect should be disabled, if no bytes are downloaded after an IP change 9 | 10 | if (isDownloadControllerRunning()) { 11 | var oldIP = getProperty("oldIP", true); 12 | var newIP = getIP(); 13 | 14 | if (newIP && !oldIP) { 15 | oldIP = newIP; 16 | setProperty("oldIP", newIP, true); 17 | } 18 | 19 | if (newIP && newIP != oldIP) { 20 | setAutoReconnect(false); 21 | setProperty("oldIP", newIP, true); 22 | var startBytes = loadedBytes(); 23 | sleep(checkDuration * 60 * 1000); 24 | var endBytes = loadedBytes(); 25 | 26 | if (startBytes == endBytes) { 27 | sleep(disableDuration * 60 * 1000); 28 | setAutoReconnect(true); 29 | } else { 30 | setAutoReconnect(true); 31 | } 32 | } 33 | } 34 | 35 | //Function 36 | function getIP() { 37 | try { 38 | return getPage("http://ipcheck0.jdownloader.org"); 39 | } catch (e) { 40 | return null 41 | } 42 | } 43 | 44 | function setAutoReconnect(boolean) { 45 | callAPI("config", "set", "jd.controlling.reconnect.ReconnectConfig", null, "AutoReconnectEnabled", boolean); 46 | } 47 | 48 | function loadedBytes() { 49 | return callAPI("polling", "poll", { 50 | "aggregatedNumbers": true 51 | })[0].eventData.data.loadedBytes; 52 | } 53 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/aiimaim_2.js: -------------------------------------------------------------------------------- 1 | // Limit number of reconnects allowed during user defined duration 2 | // Trigger Required: "After a reconnect" 3 | // IMPORTATNT: Enable "Synchronous execution of script" checkbox in the top panel 4 | // Related Topic: https://board.jdownloader.org/showthread.php?t=76639 5 | 6 | var maxReconnects = 3; // <- Maximum alllowed reconnects 7 | var duration = 10; // <- Duration (in minutes) to check if the number of reconnects have exceeded the max allowed reonnects 8 | var disableDuration = 60; // <- Duration (in minutes) for which auto-reconnect will be disabled if reconnects exceed the specified limit 9 | 10 | if (!getProperty("timeList", true)) setProperty("timeList", [], true); 11 | var timeList = getProperty("timeList", true); 12 | 13 | if (result == "SUCCESSFUL") timeList.push(new Date()); 14 | var totalReconnects = timeList.length; 15 | 16 | if (totalReconnects >= maxReconnects) { 17 | var beginTime = timeList[totalReconnects - maxReconnects]; 18 | var endTime = timeList[totalReconnects - 1] 19 | 20 | if (endTime - beginTime < duration * 60 * 1000) { 21 | setAutoReconnectEnabled(false); 22 | sleep(disableDuration * 60 * 1000); 23 | setAutoReconnectEnabled(true); 24 | } 25 | } 26 | 27 | // Function 28 | function setAutoReconnectEnabled(boolean) { 29 | callAPI("config", "set", "jd.controlling.reconnect.ReconnectConfig", null, "AutoReconnectEnabled", boolean); 30 | } 31 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/animus.js: -------------------------------------------------------------------------------- 1 | // Replace file name with archive name 2 | // Trigger: Archive extraction finished 3 | // Forum Post: https://board.jdownloader.org/showpost.php?p=428880&postcount=508 4 | 5 | var myExtensions = ["avi", "mkv", "mp4", "mpeg"]; 6 | 7 | archive.getExtractedFilePaths().forEach(function(file) { 8 | if (myExtensions.indexOf(file.getExtension()) == -1) return; 9 | var path = splitPath(file); 10 | file.renameTo(path[1] + archive.getName() + path[3]); 11 | }); 12 | 13 | //Functions 14 | function splitPath(path) { 15 | return path.toString().match(/(.+\\)(.+)(\..+)/); 16 | } 17 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/desperado591.js: -------------------------------------------------------------------------------- 1 | // Send email notification (NAS) 2 | // Trigger Required: A Download Stopped 3 | // Important: Enable "Synchronous execcution" checkbox in top panel 4 | 5 | if (link.isFinished()) { 6 | var absender = "nas@domain.de"; 7 | var empfaenger = "empfaenger@domain.de"; 8 | var inhalt = getPath(JD_HOME + "/link - inhalt.txt"); 9 | 10 | writeFile(inhalt, "Link Finished: " + link.getName(), true); 11 | callSync("sendmail", "-F", absender, "-t", empfaenger, "<", inhalt); 12 | deleteFile(inhalt, false); 13 | } 14 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/desperado591_2.js: -------------------------------------------------------------------------------- 1 | // Send email notification (NAS) 2 | // Trigger Required: Archive Extracton Finished 3 | // Important: Enable "Synchronous execcution" checkbox in top panel 4 | 5 | var absender = "nas@domain.de"; 6 | var empfaenger = "empfaenger@domain.de"; 7 | var inhalt = getPath(JD_HOME + "/archive - inhalt.txt"); 8 | 9 | writeFile(inhalt, "Extraction Finished: " + archive.getName(), true); 10 | callSync("sendmail", "-F", absender, "-t", empfaenger, "<", inhalt); 11 | deleteFile(inhalt, false); 12 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/dpinbsp.js: -------------------------------------------------------------------------------- 1 | // Unskip links with unsolved captcha 2 | // Trigger: Interval 3 | // Set interval to 3600000 (60 minutes) or more 4 | // Enable 'Synchronous Execution' checkbox in top panel 5 | // Related Post: https: //board.jdownloader.org/showpost.php?p=432828&postcount=522 6 | 7 | (function() { 8 | if (!isSynchronous()) return; 9 | if (interval < 60 * 60 * 1000) return; 10 | getAllDownloadLinks().forEach(function(link) { 11 | if (link.getSkippedReason() == "CAPTCHA") { 12 | link.setSkipped(false); 13 | if (!isDownloadControllerRunning()) startDownloads(); 14 | } 15 | }); 16 | })(); -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/dxzdxz1.js: -------------------------------------------------------------------------------- 1 | // Run external command on extracted files & delete archive links from list 2 | // Trigger: "Archive extraction finished" 3 | // Important: Enable 'Syncrhonous execution" checkbox in top panel 4 | // Related Post: https://board.jdownloader.org/showpost.php?p=419505&postcount=358 5 | 6 | archive.getExtractedFilePaths().forEach(function(extractedFile) { 7 | callSync("compact", "/c", "/exe:lzx", extractedFile); 8 | }); 9 | 10 | archive.getDownloadLinks().forEach(function(link) { 11 | link.remove(); 12 | }); 13 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/ehorn.js: -------------------------------------------------------------------------------- 1 | // Flatten Archives (Move extracted files from sub-folders to the main extraction folder) 2 | // Trigger Required: "Archive Extraction Finished" 3 | // Important: Enable "Sychronous Execution" checkbox in the top panel 4 | // Forum Topic: https://board.jdownloader.org/showthread.php?t=77296 5 | 6 | (function() { 7 | if (!isSynchronous()) return; 8 | var extractionFolder = archive.getExtractToFolder(); 9 | archive.getExtractedFilePaths().forEach(function(path, index) { 10 | if (path.getParent() == extractionFolder) return; 11 | var fileName = path.getName(); 12 | var exists = getPath(extractionFolder + "/" + fileName).exists(); 13 | exists ? path.renameTo(extractionFolder + "/[" + index + "] " + fileName) : path.moveTo(extractionFolder); 14 | if (!path.getParent().getChildren().length) path.getParent().delete(); 15 | }); 16 | })(); 17 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/flopodopo.js: -------------------------------------------------------------------------------- 1 | // Filename to lower case 2 | // Trigger: Packagizer Hook 3 | // Related topic: https://board.jdownloader.org/showthread.php?t=78738 4 | 5 | var fn = link.getName(); 6 | 7 | if (fn) { 8 | var lo = fn.toLowerCase(); 9 | if (fn != lo) link.setName(lo); 10 | } 11 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/guardao.js: -------------------------------------------------------------------------------- 1 | // Open container link in browser 2 | // Trigger: Downloadlist Contextmenu Button Pressed 3 | // Customize download list menu > Add new Eventscripter trigger button > Rename it to "Open Container URL" (without quotes) 4 | 5 | if (name == "Open Container URL") { 6 | var link = dlSelection.getContextLink(); 7 | var container = link.getContainerURL(); 8 | if (container) { 9 | openURL(container); 10 | } else { 11 | alert("This link has no container URL"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/guardao_2.js: -------------------------------------------------------------------------------- 1 | // Open url in browser 2 | // Trigger: Downloadlist Contextmenu Button Pressed 3 | // Customize download list menu > Add new Eventscripter trigger button > Rename it to "Open URL" (without quotes) 4 | 5 | if (name == "Open URL") { 6 | var link = dlSelection.getContextLink(); 7 | var url = link.getOriginURL() || link.getReferrerURL() || link.getContainerURL() || link.getContentURL(); 8 | openURL(url); 9 | } 10 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/netgearjd.js: -------------------------------------------------------------------------------- 1 | // Disable matching files 2 | // Trigger Required: "Toolbar Button Pressed" 3 | // Customize "Main Toolbar", add "EventScripter Trigger" button and rename it to "Disable Matching" (without quotes/case-sensitve) 4 | // Related Post: https://board.jdownloader.org/showpost.php?p=417486&postcount=289 5 | 6 | if (name == "Disable Matching") { 7 | var list = "c:/downloads/list.txt"; // <- Set path to text file 8 | var comment = "Exists on list"; // <- Set text which will be used as comment in matching links 9 | if (getPath(list).exists()) { 10 | var items = readFile(list).split("\r\n"); 11 | getAllDownloadLinks().concat(getAllCrawledLinks()).forEach(function(link) { 12 | var name = link.getName(); 13 | var matching = (items.indexOf(name) > -1); 14 | // if (matching) link.setEnabled(false); 15 | if (matching) link.setComment(comment); 16 | }); 17 | } else { 18 | alert("\"" + list + "\" not found."); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/netgearjd_2.js: -------------------------------------------------------------------------------- 1 | // Detect duplicate files 2 | // Trigger Required: "Toolbar Button Pressed" 3 | // Customize "Main Toolbar", add "EventScripter Trigger" button and rename it to "Detect Duplicate" (without quotes/case-sensitve) 4 | // The script will work in linkgrabber list only when the downloader folder is set by the user, either manually or via packagizer. 5 | // Related Post: https://board.jdownloader.org/showpost.php?p=418373&postcount=326 6 | 7 | if (name == "Detect Duplicate") { 8 | var comment = "Exists on Disk" // <- Set text which will be used as comment in duplicate files 9 | getAllFilePackages().concat(getAllCrawledPackages()).forEach(function(package) { 10 | var folder = package.getDownloadFolder(); 11 | var files = []; 12 | 13 | if (folder) { 14 | getPath(folder).getChildren().forEach(function(file) { 15 | files.push(file.getName()); 16 | }); 17 | if (files.length) { 18 | package.getDownloadLinks().forEach(function(link) { 19 | var duplicate = files.indexOf(link.getName()) > -1; 20 | if (duplicate) link.setComment(comment); 21 | }); 22 | } 23 | } 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/patriks.js: -------------------------------------------------------------------------------- 1 | // Move all links to download list 2 | // Related Post: https://board.jdownloader.org/showpost.php?p=419538&postcount=364 3 | 4 | moveAllToDownloadList(); 5 | 6 | // Function 7 | function moveAllToDownloadList() { 8 | callAPI("linkgrabberv2", "cleanup", [], [], "DELETE_DUPE", "REMOVE_LINKS_ONLY", "ALL"); 9 | getAllCrawledPackages().forEach(function(package) { 10 | callAPI("linkgrabberv2", "moveToDownloadlist", [], [package.getUUID()]); 11 | }); 12 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/patriks_2.js: -------------------------------------------------------------------------------- 1 | // Format Date 2 | // Related Post: https://board.jdownloader.org/showpost.php?p=420365&postcount=375 3 | 4 | var a /*date*/ = now(); 5 | 6 | alert(a); 7 | 8 | // Function 9 | function now() { 10 | var d = new Date(); 11 | var t = d.toString().split(" "); 12 | return t[3] + ('0' + (d.getMonth() + 1)).slice(-2) + t[2] + " " + t[4]; 13 | } 14 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/patriks_3.js: -------------------------------------------------------------------------------- 1 | // vk.com: If file exists, stop the download and remove the link, else rename it. 2 | // Trigger: A Download Started 3 | // Forum Post: https://board.jdownloader.org/showpost.php?p=421495&postcount=402 4 | 5 | if (link.getHost() == "vkontakte.ru") { 6 | 7 | while (link.getBytesLoaded() == 0) sleep(1000); 8 | 9 | var newName = link.getProperty("LINKDUPEID") + " - " + link.getProperty("FINAL_FILENAME"); 10 | var folder = link.getPackage().getDownloadFolder(); 11 | var existsOnDisk = getPath(folder + "/" + newName).exists(); 12 | 13 | if (existsOnDisk) { 14 | link.reset(); 15 | link.remove(); 16 | } else { 17 | link.setName(newName); 18 | link.setComment(link.getProperty("picturedirectlink")); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/peymanch.js: -------------------------------------------------------------------------------- 1 | // Skip links from specified host when daily limit is reached 2 | // Trigger required: Interval (Minimum:60000ms, Recommended:300000ms or more) 3 | // Forum Topic: https://board.jdownloader.org/showpost.php?p=423214&postcount=448 4 | 5 | var dailyLimit = 29.50; // <- Set daily limit in GiB 6 | var myHost = "hostname.com"; // <- Set JD plugin (host) name 7 | 8 | (function() { 9 | if (interval < 60000) return; 10 | if (!getRunningDownloadLinks().length) return; 11 | 12 | var bytesLoaded = 0; 13 | 14 | getAllDownloadLinks().forEach(function(link) { 15 | if (link.getContentURL().indexOf(myHost) == -1) return; 16 | var finishedToday = new Date(link.getFinishedDate()).setHours(0, 0, 0, 0) == new Date().setHours(0, 0, 0, 0); 17 | var partiallyLoaded = !link.isFinished() && link.getBytesLoaded() > 0; 18 | if (finishedToday || partiallyLoaded) bytesLoaded += link.getBytesLoaded(); 19 | }); 20 | 21 | if (bytesLoaded / (1024 * 1024 * 1024) >= dailyLimit) skipHost(); 22 | 23 | function skipHost() { 24 | getAllDownloadLinks().forEach(function(link) { 25 | if (!link.isFinished() && link.getContentURL().indexOf(myHost) > -1 && !link.isSkipped()) link.setSkipped(true); 26 | }); 27 | } 28 | })(); 29 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/rednoah.js: -------------------------------------------------------------------------------- 1 | // Run filebot on package finished (custom event) 2 | // Trigger: Remote API Event fired 3 | // Forum Topic: https://board.jdownloader.org/showthread.php?t=68480 4 | 5 | if (packageFinished()) { 6 | var script = JD_HOME + '/jdownloader-postprocess.sh'; 7 | var path = package.getDownloadFolder(); 8 | var name = package.getName(); 9 | var label = package.getComment() || 'N/A'; 10 | var command = [script, path, name, label]; 11 | 12 | log(command); 13 | log(callSync(command)); 14 | } 15 | 16 | //Function 17 | function packageFinished() { 18 | if (event.publisher != "downloads") return; 19 | var id = event.id; 20 | if (id != "LINK_UPDATE.status" && id != "LINK_UPDATE.extractionStatus") return; 21 | var data = JSON.parse(event.data); 22 | if (data.status != "FINISHED" && data.extractionStatus != "SUCCESSFUL") return; 23 | var link = getDownloadLinkByUUID(data.uuid); 24 | if (!link) return; 25 | package = link.getPackage(); 26 | if (!package.isFinished()) return; 27 | var extractionPending = package.getDownloadLinks().some(function(link) { 28 | return link.getArchive() && link.getExtractionStatus() != "SUCCESSFUL"; 29 | }); 30 | if (extractionPending) return; 31 | return true; 32 | } 33 | -------------------------------------------------------------------------------- /jdownloader/eventscripter/scripts/serrato.js: -------------------------------------------------------------------------------- 1 | // Set last download destination as download folder for new links 2 | // Trigger: Packagizer Hook 3 | // Enable Synchronous execution checkbox in the top Panel 4 | // Forum Topic: https://board.jdownloader.org/showthread.php?t=78891 5 | 6 | if (isSynchronous()) link.setDownloadFolder(getLastDownloadDestination()); 7 | 8 | // Function 9 | function getLastDownloadDestination() { 10 | return callAPI("config", "get", "org.jdownloader.gui.views.linkgrabber.addlinksdialog.LinkgrabberSettings", null, "DownloadDestinationHistory")[0].name; 11 | } 12 | -------------------------------------------------------------------------------- /jdownloader/link_crawler/rules/rulereaper1911.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "enabled" : true, 3 | "cookies" : null, 4 | "updateCookies" : true, 5 | "maxDecryptDepth" : 0, 6 | "id" : 1540105439125, 7 | "name" : null, 8 | "pattern" : "https://www.cartoonpornvideos.com/click/[\\d-]+/video/(.+)-.+.html", 9 | "rule" : "DEEPDECRYPT", 10 | "packageNamePattern" : null, 11 | "passwordPattern" : null, 12 | "formPattern" : null, 13 | "deepPattern" : null, 14 | "rewriteReplaceWith" : null 15 | } ] 16 | -------------------------------------------------------------------------------- /jdownloader/linkgrabber_filter/filters/filtersreaper1911.filter: -------------------------------------------------------------------------------- 1 | [ { 2 | "filetypeFilter" : { 3 | "enabled" : false, 4 | "audioFilesEnabled" : false, 5 | "matchType" : "IS", 6 | "useRegex" : false, 7 | "hashEnabled" : false, 8 | "videoFilesEnabled" : false, 9 | "docFilesEnabled" : false, 10 | "archivesEnabled" : false, 11 | "imagesEnabled" : false, 12 | "customs" : null 13 | }, 14 | "originFilter" : { 15 | "enabled" : false, 16 | "matchType" : "IS", 17 | "origins" : [ ] 18 | }, 19 | "onlineStatusFilter" : { 20 | "enabled" : false, 21 | "matchType" : "IS", 22 | "onlineStatus" : "OFFLINE" 23 | }, 24 | "hosterURLFilter" : { 25 | "enabled" : false, 26 | "matchType" : "CONTAINS", 27 | "regex" : "", 28 | "useRegex" : false 29 | }, 30 | "created" : 1540103814687, 31 | "sourceURLFilter" : { 32 | "enabled" : true, 33 | "matchType" : "CONTAINS", 34 | "regex" : "https://www.cartoonpornvideos.com/click/[\\d-]+/video/(.+)-.+.html", 35 | "useRegex" : true 36 | }, 37 | "conditionFilter" : { 38 | "enabled" : false, 39 | "matchType" : "IS_TRUE", 40 | "conditions" : [ ] 41 | }, 42 | "testUrl" : "https://www.cartoonpornvideos.com/click/1-42/video/princess-rosalina-gets-fucked-in-3d-xENl4qYSUeJ.html", 43 | "enabled" : true, 44 | "valid" : true, 45 | "packagenameFilter" : { 46 | "enabled" : false, 47 | "matchType" : "CONTAINS", 48 | "regex" : "", 49 | "useRegex" : false 50 | }, 51 | "filenameFilter" : { 52 | "enabled" : true, 53 | "matchType" : "CONTAINS_NOT", 54 | "regex" : "default", 55 | "useRegex" : false 56 | }, 57 | "name" : "www.cartoonpornvideos.com", 58 | "matchAlwaysFilter" : { 59 | "enabled" : false 60 | }, 61 | "pluginStatusFilter" : { 62 | "enabled" : true, 63 | "matchType" : "IS", 64 | "pluginStatus" : "PREMIUM" 65 | }, 66 | "filesizeFilter" : { 67 | "enabled" : false, 68 | "from" : 0, 69 | "matchType" : "BETWEEN", 70 | "to" : 0 71 | } 72 | } ] 73 | -------------------------------------------------------------------------------- /jdownloader/packagizer/rules/reaper1911.packagizer: -------------------------------------------------------------------------------- 1 | [ { 2 | "filetypeFilter" : { 3 | "enabled" : false, 4 | "audioFilesEnabled" : false, 5 | "matchType" : "IS", 6 | "useRegex" : false, 7 | "hashEnabled" : false, 8 | "videoFilesEnabled" : false, 9 | "docFilesEnabled" : false, 10 | "archivesEnabled" : false, 11 | "imagesEnabled" : false, 12 | "customs" : null 13 | }, 14 | "originFilter" : { 15 | "enabled" : false, 16 | "matchType" : "IS", 17 | "origins" : [ ] 18 | }, 19 | "hosterURLFilter" : { 20 | "enabled" : false, 21 | "matchType" : "CONTAINS", 22 | "regex" : "", 23 | "useRegex" : false 24 | }, 25 | "onlineStatusFilter" : { 26 | "enabled" : false, 27 | "matchType" : "IS", 28 | "onlineStatus" : "OFFLINE" 29 | }, 30 | "chunks" : -1, 31 | "created" : 1540102681015, 32 | "sourceURLFilter" : { 33 | "enabled" : true, 34 | "matchType" : "CONTAINS", 35 | "regex" : "https://www.cartoonpornvideos.com/click/1-42/video/(.+)-.+.html", 36 | "useRegex" : true 37 | }, 38 | "conditionFilter" : { 39 | "enabled" : false, 40 | "matchType" : "IS_TRUE", 41 | "conditions" : [ ] 42 | }, 43 | "testUrl" : "https://www.cartoonpornvideos.com/click/1-42/video/(.+)-.+.html", 44 | "enabled" : true, 45 | "valid" : true, 46 | "filename" : ".", 47 | "packagenameFilter" : { 48 | "enabled" : false, 49 | "matchType" : "CONTAINS", 50 | "regex" : "", 51 | "useRegex" : false 52 | }, 53 | "filenameFilter" : { 54 | "enabled" : true, 55 | "matchType" : "CONTAINS", 56 | "regex" : "default", 57 | "useRegex" : false 58 | }, 59 | "name" : "Get filename from source url", 60 | "matchAlwaysFilter" : { 61 | "enabled" : false 62 | }, 63 | "pluginStatusFilter" : { 64 | "enabled" : false, 65 | "matchType" : "IS", 66 | "pluginStatus" : "PREMIUM" 67 | }, 68 | "filesizeFilter" : { 69 | "enabled" : false, 70 | "from" : 0, 71 | "matchType" : "BETWEEN", 72 | "to" : 0 73 | } 74 | } ] 75 | -------------------------------------------------------------------------------- /jdownloader/packagizer/rules/thekalinga.packagizer: -------------------------------------------------------------------------------- 1 | [ { 2 | "filetypeFilter" : { 3 | "enabled" : false, 4 | "audioFilesEnabled" : false, 5 | "matchType" : "IS", 6 | "useRegex" : false, 7 | "hashEnabled" : false, 8 | "videoFilesEnabled" : false, 9 | "docFilesEnabled" : false, 10 | "archivesEnabled" : false, 11 | "imagesEnabled" : false, 12 | "customs" : null 13 | }, 14 | "originFilter" : { 15 | "enabled" : false, 16 | "matchType" : "IS", 17 | "origins" : [ ] 18 | }, 19 | "hosterURLFilter" : { 20 | "enabled" : false, 21 | "matchType" : "CONTAINS", 22 | "regex" : "", 23 | "useRegex" : false 24 | }, 25 | "onlineStatusFilter" : { 26 | "enabled" : false, 27 | "matchType" : "IS", 28 | "onlineStatus" : "OFFLINE" 29 | }, 30 | "chunks" : -1, 31 | "created" : 1540306337218, 32 | "sourceURLFilter" : { 33 | "enabled" : true, 34 | "matchType" : "CONTAINS", 35 | "regex" : ".+#filename=(.+)", 36 | "useRegex" : true 37 | }, 38 | "conditionFilter" : { 39 | "enabled" : false, 40 | "matchType" : "IS_TRUE", 41 | "conditions" : [ ] 42 | }, 43 | "testUrl" : "", 44 | "enabled" : true, 45 | "valid" : true, 46 | "filename" : "", 47 | "packagenameFilter" : { 48 | "enabled" : false, 49 | "matchType" : "CONTAINS", 50 | "regex" : "", 51 | "useRegex" : false 52 | }, 53 | "filenameFilter" : { 54 | "enabled" : false, 55 | "matchType" : "CONTAINS", 56 | "regex" : "", 57 | "useRegex" : false 58 | }, 59 | "name" : "Parse file name from URL (https://board.jdownloader.org/showthread.php?t=79010)", 60 | "matchAlwaysFilter" : { 61 | "enabled" : false 62 | }, 63 | "pluginStatusFilter" : { 64 | "enabled" : false, 65 | "matchType" : "IS", 66 | "pluginStatus" : "PREMIUM" 67 | }, 68 | "filesizeFilter" : { 69 | "enabled" : false, 70 | "from" : 0, 71 | "matchType" : "BETWEEN", 72 | "to" : 0 73 | } 74 | } ] --------------------------------------------------------------------------------