#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 19: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 22: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
|
|||
|
|||
![]()
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 15: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
|
|||
|
|||
![]()
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); } |
![]() |
Thread Tools | |
Display Modes | |
|
|