JDownloader Community - Appwork GmbH
 

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 15.09.2019, 09:20
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by Bach View Post
... script for an automatic update + restart after all active downloads.
Code:
// Update when JD is Idle
// Trigger Required: "Interval"
// Set interval to 600000 (10 mins.) or more.

(function() {
    if (callAPI("update", "isUpdateAvailable") == false) return;
    if (callAPI("linkcrawler", "isCrawling")) return;
    if (callAPI("linkgrabberv2", "isCollecting")) return;
    if (callAPI("extraction", "getQueue").length > 0) return;
    if (callAPI("downloadcontroller", "getCurrentState") != "IDLE") return;
    callAPI("update", "restartAndUpdate");
})();

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");
}

Last edited by mgpai; 18.01.2021 at 21:38. Reason: Replaced script
Reply With Quote
 

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 23: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.