|
#1
|
|||
|
|||
![]()
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); } 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. |
#2
|
|||
|
|||
![]() Code:
link.getProperty("HASHINFO"); |
#3
|
|||
|
|||
![]()
Worked!!! That was fast! Thanks so much!!!
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(); var fileMD5 = link.getProperty("HASHINFO"); urls.push(fileUUID + "," + fileMD5 + "," + downloadURL + "," + fileName); } if (!getPath(exportFolder).exists()) getPath(exportFolder).mkdirs(); writeFile(exportFolder + exportFile, urls.join("\r\n"), true); } |
#4
|
||||
|
||||
![]()
Wait for next Core update, then CrawledLink/DownloadLink will have new method getHashInfo returning String representation in form
Type|0,1(Trustworthy flag)|0,1(Forced flag)|HASH Trustworthy=source of this HASH value Forced=hash is forced by user/scripts
__________________
JD-Dev & Server-Admin |
#5
|
||||
|
||||
![]()
@mgpai: you were faster
![]()
__________________
JD-Dev & Server-Admin |
![]() |
Thread Tools | |
Display Modes | |
|
|