View Single Post
  #19  
Old 02.07.2022, 03:42
TomNguyen TomNguyen is offline
DSL Light User
 
Join Date: Jul 2017
Posts: 33
Default

Quote:
Originally Posted by mgpai View Post
Simple history of downloaded links in text format.
  • Default folder: "<jdownloader>\auto\history" (e.g "c:\jdownloader\auto\history")
  • Default file name: "<current date>.txt" (e.g. "Oct 07 2016.txt")
Code:
// Simple history
// Trigger Required : A Download Stopped

if (link.isFinished()) {
    var a /*date*/ = new Date().toString().substring(4, 16);
    var b /*history folder*/ = JD_HOME + "/auto/history/";
    var c /*history file Name */ = a + ".txt";
    var d /*download url*/ = link.getContentURL();
    var e /*download file name*/ = link.getName();

    if (!getPath(b).exists()) getPath(b).mkdirs();
    writeFile(b + c, [d, e].join(",") + "\r\n", true);
}
Dear mgpai,
Could you please help modify this script to save status of all links currently in Jdownloader (not just downloaded links but also links that are currently downloading, links are waiting to download and error links).
My intention is to run this script once per day to get status of all links.
I am currently running Jdownloader on a small Raspberry Pi that doesn't have a screen, it would be very convenient to get status of all links in a text file every day.
Thank you!

Last edited by TomNguyen; 02.07.2022 at 04:10.
Reply With Quote