View Single Post
  #191  
Old 07.10.2022, 12:21
georgegalily georgegalily is offline
Super Loader
 
Join Date: Oct 2018
Posts: 29
Thumbs up

Quote:
Originally Posted by Jiaz View Post
@georgegalily: Please create a log, see **External links are only visible to Support Staff**...
in case you cannot create log in that session, restart JDownloader and make sure to have the previous session/time range selected when creating the log. and then post logID here
Thank you, I solved the issue as I stated in the post by

UNCHECKING "Synchronous Execution of script" in each script that has this option in top of it


But, can I remove dup links instead of disabling them via "link.enabled = false;????"
in this script,
code:


Code:
//Add your script here. Feel free to use the available api properties and methods
// If download link is present in history file, mark it as duplicae (add "#duplicatelink" to comment)
// Trigger required: Packagizer Hook

if (state == "AFTER") {
    var url = link.getURL();
    var historyFile = getPath(JD_HOME + "/cfg/history.txt");
    var history = historyFile.exists() ? readFile(historyFile) : "";

    if (history.indexOf(url) > -1) {
        var text = "#duplicatelink";
        var comment = link.getComment();
        comment = comment ? text + " " + comment : text;
        link.setComment(comment);
        link.enabled = false;

    }
}
Thanks

Last edited by georgegalily; 07.10.2022 at 12:26.
Reply With Quote