JDownloader Community - Appwork GmbH
 

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01.06.2021, 10:42
groinksan groinksan is offline
DSL User
 
Join Date: Dec 2018
Posts: 39
Default Rapidgator.net - Event Scripter to extract MD5 checksum

I'm just starting out on using Event Scripter. I've so far successfully modified a script to fit most of my needs:

Code:
// Rapidgator Export download URLs
// Trigger : "DownloadList Contextmenu Button Pressed"

if (name == "Rapidgator Export URLs") {
    var exportFolder = JD_HOME + "/auto/export/"; // <- Folder for exporting the text files
    var now = new Date().toString().substring(4, 24).replace(/:/g, "."); // <- Timestamp used in file name
    var exportFile = now + " - DL Selection.txt"; // <- Filename for exporting the URLs
    var links = dlSelection.getDownloadLinks();
    var urls = [];

    for (i = 0; i < links.length; i++) {
        var link = links[i];
        var fileName = link.getName();
        var downloadURL = link.getContentURL();
        var fileUUID = link.getUUID();
        urls.push(fileUUID + "," + downloadURL + "," + fileName);
    }

    if (!getPath(exportFolder).exists()) getPath(exportFolder).mkdirs();
    writeFile(exportFolder + exportFile, urls.join("\r\n"), true);
}
JD is already running the checksum on the file upon completion, and it somehow saves it to the Downloadlist. When I enable the "Checksum" field in the listing, it shows "[MD5] xxxxxxxxx" for all the files related to Rapidgator.

What I'm trying to do now is access the previously saved MD5 checksum in my script, so that I can save it to the text file. I already checked the API listing, but didn't find anything referring to the checksum field. The only thing I've found so far is getChecksum(), but my understanding is that it will re-process the file and generate the checksum, and I don't think I have to do that since the checksum is already stored in the downloadlist.

Last edited by groinksan; 01.06.2021 at 11:01.
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 20:56.
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 - 2023, Jelsoft Enterprises Ltd.