#1521
|
|||
|
|||
![]()
Yes. It's fine.
|
#1522
|
|||
|
|||
![]()
Great! Thank you very much!
__________________
Aktuelles Windows |
#1523
|
|||
|
|||
![]()
I'm looking for a script that will replace any twitter links that contain "/status/NumbersHere" with "/media." I've found some javascript things that claim to replace text with other text, but I have no idea what I'm doing.
|
#1524
|
|||
|
|||
![]() Quote:
Code:
/* Rewrite URL Trigger: New Crawler Job */ var re = /(https:\/\/twitter.com\/[^\/]+\/)(status\/\d+)/g; var text = job.text; if (re.test(text)) { job.text = job.text.replace(re, "$1media"); } |
#1525
|
|||
|
|||
![]()
Ahhhhhhhhhh! Perfect! Thank you :D
|
#1526
|
|||
|
|||
![]()
Is there something like link.isExtractable or I have to do it only by the file extension?
|
#1527
|
|||
|
|||
![]() Quote:
Code:
var myArchive = myCrawledLink.getArchive(); var myArchive[] = myCrawledPackage.getArchives(); var myArchive = myDownloadLink.getArchive(); var myArchive[] = myFilePackage.getArchives(); |
#1528
|
|||
|
|||
![]()
Hi folks,
I have followed the instructions on the forum and successfully installed the script so that the downloaded content is automatically converted to MP3 format. It worked ok for one day and now its not converting anymore. Please can someone point me to the right direction? Kind Regards |
#1529
|
|||
|
|||
![]()
Hey I need a script that simply copies the file directory and pastes it as a comment since there isn't a search function for directories. Thanks!
|
#1530
|
|||
|
|||
![]()
I was unable to reproduce any errors. Check if the script has been disabled. If the script is getting disabled automatically, provide the url which causes the same.
|
#1531
|
|||
|
|||
![]() Quote:
Code:
/* On download finished, append download folder to comment Trigger: A Download Stopped */ if (link.finished) { var comment = link.comment || "", folder = link.package.getDownloadFolder(); if (comment.indexOf(folder) == -1) { link.comment = comment + folder; } } |
#1532
|
|||
|
|||
![]()
Requested by dex1983 (IRC)
Code:
/* On package finished, if the package does not contain archives, move files to user-specified location Trigger: Package finished */ var myFolder = "/path/to/folder"; //<- set destination path if (!package.getArchives().length) { package.getDownloadLinks().forEach(function(link) { getPath(link.downloadPath).moveTo(myFolder); }) } Code:
/* On package finished, move files to user-specified location Trigger: Archive extraction finished */ var myFolder = "/path/to/folder", //<- set destination path links = archive.getDownloadLinks(); if (links) { var package = links[0].package; if (package.finished) { package.getDownloadLinks().forEach(function(link) { if (link.getArchive()) { archive.getExtractedFilePaths().forEach(function(file) { file.moveTo(myFolder); }) } else { getPath(link.downloadPath).moveTo(myFolder); } }) } } |
#1533
|
||||
|
||||
![]()
Merged EventScripter threads.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#1534
|
|||
|
|||
![]()
Requested by @RedNapalm (IRC)
Code:
/* Append download folder to comment Trigger: Downloadlist Contextmenu button pressed Customize context menu > Add new "Eventscript Trigger" button > Rename it to "Append folder to comment" (without quotes) > Change Icon (optional)) */ if (name == "Append folder to comment") { dlSelection.getLinks().forEach(function(link) { if (link.finished) { var comment = link.comment || "", folder = link.package.getDownloadFolder(); if (comment.indexOf(folder) == -1) { link.comment = comment + folder; } } }) } |
#1535
|
|||
|
|||
![]()
via the blacklist I disabled captcha to mobile and other manual options except for a few that are whitelisted and the blacklisted does not show up inside the iOS app to solve the captcha - however I still receive the notification (presumably generated via the event scripter) that there is a captcha challenge to solve. Is there a way to disable this notification if the captcha is within the blacklist? (I would still like to receive the notification for the whitelisted hosts)
for context the blacklisted captcha is solved already by external captcha method (CaptchaSolver). maybe the problem is that external captcha method does not figure in the captcha solver priority/timing? |
#1536
|
||||
|
||||
![]()
Merged EventScripter threads.
@quidnunc Your script will need functionality to process that blacklist. You will have to update it accordingly. -psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#1537
|
|||
|
|||
![]() Quote:
Hello, It works. But how can I add information about the source? (the webpage where found the link) Last edited by metozeton; 29.09.2020 at 01:35. |
#1538
|
|||
|
|||
![]() Quote:
Code:
// Export related URLs // Trigger : Linkgrabber Contextmenu Button Pressed OR DownloadList Contextmenu Button Pressed if (name == "Export URLs") { var lgSelection, dlSelection, selection = lgSelection || dlSelection; if (selection) { var folder = JD_HOME + "/auto/export/", // <- Folder for exporting the text files date = new Date().toString().substring(4, 24).replace(/:/g, "."), // <- Timestamp used in file name name = lgSelection ? " - LG Selection.txt" : " - DL Selection.txt", file = date + name, content = [], links = selection.links, addContent = function(arr, data) { if (data && arr.indexOf(data) == -1) { arr.push(data); } }; links.forEach(function(link) { var arr = []; addContent(arr, link.name); addContent(arr, link.contentURL); addContent(arr, link.pluginURL); addContent(arr, link.containerURL); addContent(arr, link.referrerURL); addContent(arr, link.originURL); content.push(arr.join(",")); }) if (!getPath(folder).exists()) { getPath(folder).mkdirs(); } writeFile(folder + file, content.join("\r\n"), true); } } |
#1539
|
|||
|
|||
![]()
:confused:
Hello ![]() I'm new at this. I want to in convert all audio files into MP3 format. Can you please explain me where to input this code and how to do it? Also, if I want to download in OGG format later, how do I revert to the default settings? THANK YOU SO MUCH!!! :biggrin: Quote:
|
#1540
|
|||
|
|||
![]() Quote:
Thats the comman I use: Code:
exiftool '-PDF:Title<${filename;s/\..*?$//}' '-XMP-dc:Tile<${filename;s/\.[^.]*$//}' |
#1541
|
|||
|
|||
![]() Quote:
Quote:
|
#1542
|
|||
|
|||
![]() Quote:
Synchronous: Code:
callSync("\"commandline1\"", "\"commandline2\"", "\"...\"" }); Asynchronous: Code:
callAsync(function(){},"\"commandline1\"", "\"commandline2\"", "\"...\"" }); Alternatively, you can create a batch file and call it in the script instead and pass the variable to it. I can try to help you configure it if you contact me in JD Chat. Code:
kiwiirc.com/nextclient/irc.freenode.net/#jdownloader |
#1543
|
|||
|
|||
![]()
Hello i would like jdownloader to automatically delete the "aac" and "ogg" files once it is finished converting them?
How should I proceed? Can you help me ? Thank you in advance for your answers |
#1544
|
|||
|
|||
![]() Quote:
Code:
var deleteSourceFile = false; // Set this to true to delete source file after conversion. |
#1545
|
|||
|
|||
![]()
line 21 is already there
// 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); } } } |
#1546
|
|||
|
|||
![]()
So similar to this:
// Move finished non-archive files, to user defined folder // Trigger required: "A Download Stopped" var destFolder = "c:/myFolder/movedFiles"; // <- Set destination folder. if (link.isFinished() && !link.getArchive()) { getPath(link.getDownloadPath()).moveTo(destFolder); } I'm looking for a way to move completed downloads into a 'subfolder' of the "c:/myFolder/movedFiles" that has the same name as the file or folder being downloaded. So if JDownloader2 is downloading the following...
...then once completed, move them to:
This would keep the structure intact. Thanks! |
#1547
|
||||
|
||||
![]()
@smokiemamour: you have to modify
Quote:
__________________
JD-Dev & Server-Admin |
#1548
|
|||
|
|||
![]() Quote:
Code:
// Move downloaded non-archive files to user-specified folder // Trigger: A Download Stopped if (link.finished && !link.archive) { var downloadFolder = link.package.downloadFolder; var newFolder = downloadFolder.replace("C:\\Downloads", "C:\\myFolder\\MovedFiles"); // case-sensitive if (newFolder != downloadFolder) { getPath(link.downloadPath).moveTo(newFolder); } } |
#1549
|
|||
|
|||
![]() Quote:
Currently all downloads go into F:/!Downloads/JDownloader2 into a subfolder which is the name of a movie for example. So...
When each download is finished, I would like these to go to:
[ |
#1550
|
|||
|
|||
![]()
I have created the script based on the example you provided, in which the destination folder is not a sub-folder of the source folder, but an entirely different one.
Try replacing this: Code:
var newFolder = downloadFolder.replace("C:\\Downloads", "C:\\myFolder\\MovedFiles"); // case-sensitive with this: Code:
var newFolder = downloadFolder.split("F:\\!Downloads\\JDownloader2\\").join("F:\\!Downloads\\JDownloader2\\_COMPLETE\\");// case-sensitive |
#1551
|
|||
|
|||
![]() Quote:
F:\!Downloads\JDownloader2\MovieFolderName\Movie.mkv And I would have expected it to go to: F:\!Downloads\JDownloader2\_COMPLETE\MovieFolderName\Movie.mkv |
#1552
|
|||
|
|||
![]()
I would like JDownloader to switch a file to 'Disable' (gray out) if its Status is 'Temporarily unavailable', and skip to the next file. Is there a script that can do that?
Thanks Last edited by StarFury; 21.10.2020 at 00:33. |
#1553
|
|||
|
|||
![]()
Should be working fine. Here is the script used for testing, which has the same folder settings provided in your example. Please note the source folder string is case-sensitive, as commented in the script.
Code:
/* Move downloaded non-archive files to user-specified folder Trigger: A Download Stopped */ if (link.finished && !link.archive) { var downloadFolder = link.package.downloadFolder; var newFolder = downloadFolder.split("F:\\!Downloads\\JDownloader2\\").join("F:\\!Downloads\\JDownloader2\\_COMPLETE\\");// case-sensitive if (newFolder != downloadFolder) { getPath(link.downloadPath).moveTo(newFolder); } } |
#1554
|
|||
|
|||
![]() Quote:
In any case, here is a script which does what you requested: Code:
/* Disable links with "FILE_TEMP_UNAVAILABLE" status Trigger: Interval (Recommended Interval: 60000 or more) */ if (isDownloadControllerRunning()) { getAllDownloadLinks().forEach(function(link) { var csr = link.conditionalSkipReason; if (csr) { var skipReason = csr.waitingSkipReason; if (skipReason == "FILE_TEMP_UNAVAILABLE") { link.setEnabled(false); } } }) } |
#1555
|
|||
|
|||
![]()
Thank you so much for the script, I really appreciate your help!! I just tried it and it worked for me.
I should have explained why I needed a script like this. I was looking for a way to change a file to 'Disable' when a file is not available for download, because JDownloader cannot download *some* files from this file provider I use (though the link would work in my browser if I copy/paste the link from Jdownloader2 for some reason. No big deal, I can download manually still). But if I activate Enable Shutdown, because I want the system to shutdown after all the downloads are finished, these non-downloadable files are set to retry to download, waiting after xxx seconds, and keep retrying. And shutdown won't ever get activated because the files are still in the queue, retrying forever in a loop. However, by Disable a file, the retry function won't get switched on. Because these files are disabled, and Enable Shutdown will work as intended after all the other files that are available, are all downloaded and finished. So that is what I was going for, and it works now, thanks for your excellent work ![]() Quote:
|
#1556
|
||||
|
||||
![]()
@StarFury: Can you send us example non working links to support@jdownloader.org so we can check it
__________________
JD-Dev & Server-Admin |
#1557
|
|||
|
|||
![]() Quote:
I'm so sorry but it's just not working for me. :( I have an F$ drive mapped to F: The file downloads to: F:\!Downloads\JDownloader2\MovieName\Movie.mkv, preserving the structure so it actually creates the \MovieName subfolder in the F:\!Downloads\JDownloader2 folder as expected. When the download is finished, I am expecting the entire MovieName\Movie.mkv to move to: F:\!Downloads\JDownloader2\_COMPLETED\MovieName\Movie.mkv It's not doing that though. MovieName\Movie.mkv just stays in F:\!Downloads\JDownloader2. I do have the JDownloader2 Event Scripter for this event set to "A download stopped" :( I really appreciate your time! |
#1558
|
|||
|
|||
![]()
Find me in chat room:
Code:
kiwiirc.com/nextclient/irc.freenode.net/#jdownloader |
#1559
|
|||
|
|||
![]()
It seems as if one could enable / disable one download at a time for sound notification only, not e.g. 10 with one click or a package:
![]() Is there a way to enable / disable sound notification for more than one link / download and / or a package? And is there a way to recognize whether sound notification is enabled / disabled for a link?
__________________
Aktuelles Windows |
#1560
|
|||
|
|||
![]() Quote:
Code:
/* Toggle sound notification Trigger : Downloadlist Contextmenu Button Pressed AND/OR Linkgrabber Contextmenu Button Pressed Customize context menu > Create a new "Eventscripter trigger" button > Rename it to "Toggle sound notification" > Change Icon (optional) */ if (name == "Toggle sound notification") { var dlSelection, lgSelection; var selection = dlSelection || lgSelection; if (selection) { var items = selection.linkContext ? selection.links : selection.packages; var myComment = selection.packageContext ? "#playsoundwhenpackagefinished#" : "#playsoundwhenlinkfinished#"; items.forEach(function(item) { var comment = item.comment || ""; if (comment.indexOf(myComment) > -1) { item.comment = comment.replace(myComment, ""); } else { item.comment = myComment + comment; } }) } } Quote:
|
![]() |
Thread Tools | |
Display Modes | |
|
|