#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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]() Quote:
![]() |
#1679
|
|||
|
|||
![]()
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 | |
|
|