#1641
|
||||
|
||||
@SMS: please use board search how to use packagizer to auto rename links via meta information within URL, eg https://board.jdownloader.org/showpo...18&postcount=2
__________________
JD-Dev & Server-Admin |
#1642
|
|||
|
|||
Quote:
|
#1643
|
||||
|
||||
@SMS: no bug, I've answered in the thread
__________________
JD-Dev & Server-Admin |
#1644
|
|||
|
|||
YT playlist workaround script:
Code:
gist.github.com/mgpai/b2c21be86fbdf2186eca34af16cfb95d |
#1645
|
|||
|
|||
What's a graceful way to check whether a string is contained in another string? Both strings are variables, so it can't be a hardcoded regex pattern.
Usually JavaScript offers string1.includes(string2), or the older string1.contains(string2), but neither work. In general, what JavaScript version does the Event Scripter use? And how do I find out what methods are available for a certain object or class? string1.getOwnPropertyNames() doesn't work. @mgpai: Thanks for the YouTube script, I'll try it! |
#1646
|
|||
|
|||
Quote:
Code:
str1.indexOf(str2) > -1; // boolean new RegExp(str2).test(str1) // boolean Quote:
You can define your own prototype: Code:
String.prototype.includes = function(str2) { return this.indexOf(str2) > -1; } //Usage var result = "str1".includes("str2"); // boolean Quote:
Code:
Object.getOwnPropertyNames(String); |
#1647
|
|||
|
|||
Quote:
The old version of this script (https://board.jdownloader.org/showthread.php?t=70525) works also on the headless system. Best regards tarkett Last edited by tarkett; 18.01.2021 at 20:54. |
#1648
|
|||
|
|||
Quote:
This script uses MYJD API call to check the download controller state, while the other one uses the eventscripter method. This script uses "IDLE" status to check the sate. I just checked the source code and it seems there is also a "STOPPED_STATE" which the script does not take into account, and likely fails as a result. But not sure why it works in desktop and not in headless. To avoid any confusion, I have replaced the MYJD API call in the script with the eventscripter method. Hopefully it should work fine in both. Code:
/* Update when JD is Idle Trigger Required: "Interval" (Recommended: 600000 (10 mins.) or more) */ if ( callAPI("update", "isUpdateAvailable") && !callAPI("linkcrawler", "isCrawling") && !callAPI("linkgrabberv2", "isCollecting") && !callAPI("extraction", "getQueue").length && isDownloadControllerIdle() ) { callAPI("update", "restartAndUpdate"); } Thanks for the report. |
#1649
|
|||
|
|||
Many thanks for the very fast fix. I will test it.
Edit: Confirm, it works fine on both systems Last edited by tarkett; 20.01.2021 at 23:53. |
#1650
|
|||
|
|||
|
#1651
|
|||
|
|||
Hi ,
excuse me , i search tutorial for install the script please , does not work for me :( Screenshot |
#1652
|
|||
|
|||
Check instruction in script:
Code:
// Trigger required: "A Download Stopped". The script is executed when a download is completed. Your screenshot shows you have selected "A Download started" trigger. Select/change it to "A Download stopped". |
#1653
|
|||
|
|||
FiXED ; and for bitrate 128kbps to 320kbps where is it in the script ? thanx in advance
|
#1654
|
|||
|
|||
Transcoding drawbacks (wikipedia):
Quote:
That being said, the following script ignores the input bitrate and converts the file @320kbps. Code:
/* Convert aac/m4a/ogg files to 320 kbps mp3. Trigger required: "A Download Stopped". */ if (link.finished) { var input = link.downloadPath; var output = link.downloadPath.replace(/(.+\.)(aac|m4a|ogg)$/i, "$1mp3"); if (input != output) { var interfaceName = "org.jdownloader.controlling.ffmpeg.FFmpegSetup"; var ffmpeg = callAPI("config", "get", interfaceName, null, "binarypath"); callSync(ffmpeg, "-n", "-i", input, "-b:a", "320k", output); getPath(output).size && getPath(input).delete(); } } |
#1655
|
|||
|
|||
JDownloader Setup for Windows, Linux and Mac OS X witch Filebots AMC Script
Does this still apply? **External links are only visible to Support Staff**...
I ask because it is not working. I added the scripts in question to the Event Scripter and assigned each a trigger. But nothing happens content of the jdownloader-postprocess.cmd (because Windows 10) Code:
@ECHO OFF :: Input Parameters set ARG_PATH=%1 set ARG_NAME=%2 set ARG_LABEL=%3 :: Configuration set CONFIG_OUTPUT=f:\ "C:\Program Files\Filebot\filebot.exe" -script fn:amc --output %CONFIG_OUTPUT% --action duplicate --conflict skip -non-strict --log-file amc.log --def skipExtract=n unsorted=y music=n artwork=n clean=y excludeList=excludes.txt ut_dir=%ARG_PATH% ut_kind=multi ut_title=%ARG_NAME% ut_label=%ARG_LABEL% Last edited by Tuscani; 31.01.2021 at 16:25. Reason: spelling |
#1656
|
|||
|
|||
Attachments can only be viewed by mods, so you will have to wait for them to check it and respond. But I can tell you nothing's changed in JD. So should be working fine by my account.
|
#1657
|
|||
|
|||
JDownloader Setup for Windows, Linux and Mac OS X witch Filebots AMC Script
It is about this scritps mentioned here:
ht tps://ww w.filebot.net/forums/viewtopic.php?f=4&t=3478#p19358 |
#1658
|
|||
|
|||
I guessed as much. Nothing has changed in JD, so it should work just fine. You can check the eventscripter log file in JD\logs folder for any errors. If you still have problems with troubleshooting, contact me in JD Chat:
Quote:
|
#1659
|
|||
|
|||
sorry I wanted to know if it was possible through this function to have a text file in the same folder when the link is captured or after the download is finished, where the file name is shown and next to the link captured, the download link. Thanks very kind.
|
#1660
|
|||
|
|||
Quote:
Code:
/* Write info to text file Trigger: A Download stopped */ if (link.finished) { var name = link.name; var url = link.contentURL || link.pluginURL; var data = [name, url]; var file = "linkInfo"; var folder = link.package.downloadFolder; var filePath = getPath(folder + "/" + file + ".txt"); writeFile(filePath, data.join(", ") + "\r\n", true); } |
#1661
|
|||
|
|||
Hi. I hope someone could tell me what I'm doing wrong here.
I found this script which replaces characters in filenames when added to linkgrabber: https://board.jdownloader.org/showpo...0&postcount=50 I'm altering it to suit my own needs. I can mostly do what I want with filenames without problems. 1. (Although I would like to know how to check if there's a letter/number right after 】or right before【, and add a space if a letter/number is there) 2. My big problem is this. I want to do replacing of characters in the package/download folder too. Mostly the same replacements, but with a few differences. I cannot figure out how to get the package/download folder name linkgrabber generates so that I can do replacements on that package/download folder name. The file name is grabbed in the script like this: Code:
var myPackagizerLink = link; var fileName = myPackagizerLink.getName(); All my attempts to grab the package/folder apparently get a "null" error when actually trying to do a replacement. I don't know why. I swear the following was working for a short while, but after restarting JD2 it just seems to store "null": Code:
var packageName = myPackagizerLink.getPackageName(); Code:
var packageName = myPackagizerLink.getDownloadFolder(); How do you capture the package/folder name so you can modify it, in the same manner as the filename is modified in that script I linked? I know how to do the actual replacements and set the modified package name, if only I could reliably get the package/folder name in the first place. Last edited by plip; 27.02.2021 at 13:59. |
#1662
|
|||
|
|||
Quote:
Synchronous execution should be enabled for this to work correctly. Also note, the linked script is executed twice, since it does not query the 'state' property. |
#1663
|
|||
|
|||
I have the following URLs
Code:
**External links are only visible to Support Staff**... I don't need these grouped in packages, as long as each file ends up in the right directory Last edited by dramaman; 02.03.2021 at 19:08. |
#1664
|
|||
|
|||
Quote:
Code:
kiwiirc.com/nextclient/irc.freenode.net/#jdownloader |
#1665
|
|||
|
|||
Sent
|
#1666
|
|||
|
|||
When we add a file in link grabber, can we change the name of package to
<jd:packagename>"-"<jd:simpledate:yyyy-MM-dd'T'HH:mm:ss.SSSXXX>? So the name of file appended to the dated added To be clear, Change the name of the package , but not the download folder Last edited by dramaman; 02.03.2021 at 23:27. |
#1667
|
|||
|
|||
Using timestamp with seconds precision will (most likely) generate one package per link, which might not be a desirable outcome. To avoid 'wrong' grouping generate the package name using part(s) of the url.
|
#1668
|
|||
|
|||
that is exactly what I wanted, to force files to a separate package.
I have a other script running that handles folder structure, but it broke when files have the same name. using date and time in package name fixed the issue. Last edited by dramaman; 03.03.2021 at 11:23. |
#1669
|
|||
|
|||
Quote:
Quote:
Even though the package name is same, the time stamp value will be different for each link which is added so they will be named/packaged accordingly. Without the rule they would have same name, and hence JD would have put them in a single package. |
#1670
|
|||
|
|||
Quote:
|
#1671
|
|||
|
|||
Can anybody help me? I use several proxies to go through the download limit, however the connection of a new link takes around 5 minutes due to the quality of my proxy. To avoid blocking captchas I always leave a maximum of 3 active downloads at a time. I would like the script to start the connection process for a new download when 5 minutes are left to complete an active download, calling this script:
Code:
setDownloadsPaused(false); Code:
// Keep always 3 active downloads // Trigger Required: "Interval" var links = getRunningDownloadLinks(); var minDuration = 1; var n = 0; // Check active downloads if (links.length > 0) { for (i = 0; i < links.length; i++) { var link = links[i]; if (link.getDownloadDuration() > minDuration * 60 * 1000) { n++; } } } // Downloads manager if (n >= 3 && isDownloadControllerPaused() == false) { setDownloadsPaused(true); } if (n < 3 && isDownloadControllerPaused() == true) { setDownloadsPaused(false); } Last edited by nicolau; 27.03.2021 at 15:57. |
#1672
|
|||
|
|||
Quote:
Code:
/* Start new downloads based of ETA of running downloads Trigger: Interval */ var links = getRunningDownloadLinks(); if (links.length == 3) { links.some(function(link) { if (link.getEta() < 60 * 5) { setMax(4); setMax(3); return true; } }) } function setMax(int) { var interfaceName = "org.jdownloader.settings.GeneralSettings"; var key = "MaxSimultaneDownloads"; callAPI("config", "set", interfaceName, null, key, int); } |
#1673
|
|||
|
|||
artcover attached to mp3
Hi guys, how can an mp3 be saved along with its picture (cover picture) from Soundcloud? it saves the artwork as a separate image file,. I want an mp3 file with its picture (artwork/cover) embedded in the file? so when you play it you can see the cover.
is it possible to do? do I need a script for that? it doesn't make sense to attach each artwork to each song one by one with another software as i have 1000 songs.... thank you in advance : ) |
#1674
|
|||
|
|||
It is possible only by using an external program in eventscripter. Find one which accepts command-line arguments and call it in a script to automatically perform the task.
|
#1675
|
||||
|
||||
@mgpai: ffmpeg can be used for that, eg a script that checks for download finish and then checks for file + cover file and merge them
__________________
JD-Dev & Server-Admin |
#1676
|
|||
|
|||
What is the ffmpeg command?
|
#1677
|
||||
|
||||
@mgpai: best would be to check search engine of your choice
eg stackoverflow.com/questions/54717175/how-do-i-add-a-custom-thumbnail-to-a-mp4-file-using-ffmpeg
__________________
JD-Dev & Server-Admin |
#1678
|
|||
|
|||
Sure. But almost always I end up spending more time than I'd like to, to get it working.
|
#1679
|
|||
|
|||
i need a event code script
hi dears
i need a event code script. i have got a package named "Films ". how can script a package with name force start with interval 30 minutes. please help me. Last edited by drjs5x; 31.03.2021 at 19:19. |
#1680
|
||||
|
||||
@drjs5x:
You mean wait 30 secs before each download in package x ?
__________________
JD-Dev & Server-Admin |
Thread Tools | |
Display Modes | |
|
|