#1941
|
|||
|
|||
Hey Jiaz,
this helps a lot Quote:
Thanks! |
#1942
|
||||
|
||||
Quote:
Let me guess, it was /dev/null ?
__________________
JD-Dev & Server-Admin |
#1943
|
|||
|
|||
Yes you're right
|
#1944
|
|||
|
|||
EDIT: Like 3h searching and after 5 minutes of posting I found it: Code:
var folder = getPath("C:\\folder\\"); alert(folder.getChildren().length); Last edited by Bilkoff; 20.10.2021 at 23:18. |
#1945
|
|||
|
|||
@Bilkoff: The array returned by that method can include both files and folders. isFile() and isDirectory() methods can be used to check the type of object in that array.
|
#1946
|
|||
|
|||
Thanks @TomNguyen for all the hardwork. We appreciate it!
|
#1947
|
|||
|
|||
Hi @mgpai, can you help me with script to download files at random with all the other conditions in tact i.e. total number of downloads, no of downloads per host etc... please?
|
#1948
|
|||
|
|||
Code:
/* Randomize download order Trigger: Download controller started */ var index, priorities = ["HIGHEST", "HIGHER", "HIGH", "DEFAULT", "LOW", "LOWER", "LOWEST"]; getAllDownloadLinks().forEach(function(link) { if (!link.finshed) { index = Math.floor(Math.random() * priorities.length); link.priority = priorities[index]; } }) |
#1949
|
|||
|
|||
Quote:
From what I understand of the code, this will just effect what the container holds when the download controller is started and does not include the new links added after the trigger is started. Isn't it? Edit: I have also added the same script to Trigger "LinkGrabber Bottom Button Pressed". Will this do? Last edited by reddy.shyam; 22.10.2021 at 12:02. |
#1950
|
||||
|
||||
@mgpai: nice solution my first thought was to randomize the order of the links within the packages
@reddy.shyam: you could even use "download started" as trigger the script does not rely on any special trigger objects
__________________
JD-Dev & Server-Admin |
#1951
|
|||
|
|||
Quote:
Regarding your solution, If "download started" trigger means every time a new download starts, then don't you think "LinkGrabber Bottom Bar Button Pressed" is better? With "Download started" the list gets re-sorted everytime a new download begins irrespective of new links added or not but with "LinkGrabber Bottom Bar Button Pressed" trigger, re-sorting is done only when new links are added. Is my understanding wrong? |
#1952
|
||||
|
||||
@reddy.shyam: the list is not sorted but the links priorites are getting changed and thus the download core redo the *what to download next* calculations with each new download.
"LinkGrabber Bottom Bar Button Pressed" -> you will have to add a script/action to the button bar for this to work. It's not about new links added. You can customize the buttom bar with custom actions and then assign scripts to them. You could also use "Download stopped" to only re-prioritize them when a download stopps
__________________
JD-Dev & Server-Admin |
#1953
|
|||
|
|||
Quote:
|
#1954
|
||||
|
||||
@mgpai
lol creative solution
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#1955
|
||||
|
||||
doesn't matter if before or after, it's the same
__________________
JD-Dev & Server-Admin |
#1956
|
|||
|
|||
Thanks @Jiaz. Will do a 'inky pinky ponky' and pick up.
|
#1957
|
||||
|
||||
@reddy.shyam: You're welcome. Whenever you need help, just ask
__________________
JD-Dev & Server-Admin |
#1958
|
|||
|
|||
How to read Archive Extractor setting?
Hi folks! o)
A quick question, how do I get the following boolean setting by script? "Archive Extractor -> Extract archives after download" (Attached image also shows what setting I am looking for.) I can't find the key for the setting anywhere on github or config files of JD. I was able to find correct api, storage and key strings for other settings like: "Archive Extractor -> Enabled" "Archive Extractor -> Extract to following folder" "Archive Extractor -> Extract to.." Any help appreciated! Thank you! o) |
#1959
|
|||
|
|||
Hi mgpai,
I was referred over by Jiaz from another thread, do you have a script available that can enable or disable "Silent Mode" (or Settings->Advanced Settings->SoundSettings.captchasoundenabled) on a time basis. Basically I want to stop the captchas from waking up the entire household while everyone's asleep. |
#1960
|
|||
|
|||
It can be done by an "Interval" event script (once a minute e.g.).
I would suggest lowering the volume of the whole system though, as other applications could make weird sounds as well, it may be easier for you as well, if you can't write scripts (yet). There is a tool called "nircmd.exe" out there, create a scheduled task and run it at bed time start to bring the volume down. >nircmd.exe setvolume 0 0 0 Create another scheduled task to bring volume back to normal. >nircmd.exe setvolume 0 65535 65535 Nircmds setvolume reference here: nircmd.nirsoft.net/setvolume.html |
Thread Tools | |
Display Modes | |
|
|