View Single Post
  #689  
Old 13.04.2019, 09:57
qayaq qayaq is offline
Super Loader
 
Join Date: Mar 2019
Posts: 29
Default

Quote:
Originally Posted by mgpai View Post
Code:
// Disable (instagram) links if file exists on disk
// Trigger: Remote API Event Fired

if (event.id == "ADD_PACKAGE") {
    var data = JSON.parse(event.data);
    var package = getDownloadPackageByUUID(data.uuid);
    package.getDownloadLinks().forEach(function(link) {
        if (link.getHost() != "instagram.com") return;
        if (!getPath(link.getDownloadPath()).exists()) return;
        link.setEnabled(false);
    })
}
Unfortunately JD freezes at 100% CPU forever with this script, if there are many packages (about 3000) /downloads... Do you have any ideas, what's wrong?
Reply With Quote