JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 29.12.2016, 14:33
dan.pic
Guest
 
Posts: n/a
Default [help] script for jdownloader 2

Hello everybody,

In the script hereunder if the download speed is under 4000kb jdownloader stop downloads. I need that instead of stop downloads it keep downloading with the next link.

//check if downloads are running at all
if (isDownloadControllerRunning() && !isDownloadControllerStopping()) {
var running = getRunningDownloadLinks();
//loop through all running Downloads
for (var i = 0; i < running.length; i++) {
//check if the download has been running at least 3 seconds
if (running[i].getDownloadDuration() > 3000) {
//check if the current speed is below 4000kb/s
if (running[i].getSpeed() < 4000 * 1024) {
//stop downloads
stopDownloads();
}
}
}
}
Reply With Quote
  #2  
Old 30.12.2016, 07:07
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Replace:
Code:
stopDownloads();
with:
Code:
running[i].setSkipped(true);
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 15:46.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.