#61
|
|||
|
|||
![]() Quote:
|
#62
|
|||
|
|||
![]() Quote:
|
#63
|
|||
|
|||
![]()
so its not possible to stop the download of individual links and wait?
|
#64
|
|||
|
|||
![]()
Not out of the box. This script should work just fine, so I am not sure if any other solution will be worth the effort.
|
#65
|
|||
|
|||
![]() Quote:
its probably something that only i would use so i can see that it might not be worth the effort, thanks anyway though. Last edited by Tyler; 29.03.2017 at 10:23. |
#66
|
|||
|
|||
![]() Quote:
Code:
// Skip slow links and resume them after wait time. // Trigger Required: "Interval" (Recommended: 30000 or more). // IMPORTANT: Enable "Synchronous execution of script" (checkbox). var minSpeed = 128; // (KiB/s) <- minimum download speed per link. var minDuration = 1; // (minutes) <- minimum download duration per link. var waitTime = 5; // (minutes) <- wait time before restart var links = getRunningDownloadLinks(); var skipped = []; for (i = 0; i < links.length; i++) { var link = links[i]; if (link.getDownloadDuration() < minDuration * 60 * 1000) continue; if (link.getSpeed() > minSpeed * 1024) continue; link.setSkipped(true); skipped.push(link.getUUID()); } if (skipped.length > 0) { sleep(waitTime * 60 * 1000); resumeLinks(); } //functions function resumeLinks() { callAPI("downloadsV2", "resumeLinks", skipped, []); while (isDownloadControllerStopping()) sleep(1000); if (!isDownloadControllerRunning()) startDownloads(); } |
#67
|
|||
|
|||
![]()
seems to just be setting the download to skip and starting another one.
maybe it needs to also change the simultaneous downloads from 2 to 1 during the sleep? Last edited by Tyler; 29.03.2017 at 14:37. |
#68
|
|||
|
|||
![]()
Does it stay 'skipped' even after the wait time? It will try to resume/restart the download immediately after the 'wait time'. But it can do so only if free slot is available.
|
#69
|
|||
|
|||
![]()
yeah the skipped goes away but its still starting more downloads instead of just stopping the one link.
|
#70
|
|||
|
|||
![]()
If a download slot is free and there are pending downloads in the list, new downloads will naturally start. This will be the case, not only with the script, but even when you stop/skip the link manually. It is less likely to happen if 'abort()' method used, because it tries to download the same link immediately.
|
#71
|
|||
|
|||
![]()
i know but i don't need new downloads to start, i just need the individual link that is slowed to stop.
|
#72
|
|||
|
|||
![]()
Hey guys,
maybe this is the wrong place, but i cant find a how to for call skript from event handler on my synology nas. Is there something in the forum? Thank you guys |
#73
|
||||
|
||||
![]()
Install the Eventscript Extension via Webinterface in Settings. Then restart JDownloader.
Then easiest way to write script is by using a JDownloader with GUI, write your script there and finally copy over the value from settings-advanced settings-EventScripter.scripts to your other JDownloader In case you need help with eventscripter, I suggest to ask mgpai for help
__________________
JD-Dev & Server-Admin |
#74
|
|||
|
|||
![]()
Thank you Jiaz,
it works now so far, thank you. But i have a Problem, i want to get the diretory Name of the extracted folder. package.getName(); Works on my Laptop example : pictures2016 the same package on my nas gives me the value: VARIOUS |
#75
|
||||
|
||||
![]()
Don't use package.getName as it returns the package name and not the extracted folder.
Better use *Archive extraction finished* and make use of archive information. there you an access the 'extract to' folder package name depends on settings/packagizer rules/various package settings and many more. You can ask mgpai for help with eventscripter.
__________________
JD-Dev & Server-Admin |
#76
|
|||
|
|||
![]()
Hi! Is there a way i can access the plugins data? I would like to set a stopmark when captcha solver queue is high.
Thanks! |
#77
|
||||
|
||||
![]()
plugins do not have data in that fashion.
they are just methods to perform tasks. what you're trying todo is more complicated than you realise. How are you going to measure this, one could assume it should be done at the ces provider level then set a global stop mark and when loads reduce, remove said stopmark.
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#78
|
||||
|
||||
![]()
What exactly do you mean by *captcha solver queue* is high?
captcha solver queue max contains number of concurrent downloads + linkcrawler tasks. so while downloading it can max contain 20 jobs....
__________________
JD-Dev & Server-Admin |
#79
|
|||
|
|||
![]() Quote:
Quote:
Thanks raztoki and Jiaz!! :thumbup: |
#80
|
||||
|
||||
![]()
I will check next week and provide feedback here
__________________
JD-Dev & Server-Admin |
![]() |
Thread Tools | |
Display Modes | |
|
|