View Single Post
  #881  
Old 15.09.2019, 09:20
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 644
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");
})();
Reply With Quote