View Single Post
  #1441  
Old 04.07.2020, 04:29
woriamu woriamu is offline
Junior Loader
 
Join Date: Jun 2020
Posts: 12
Default

Quote:
Originally Posted by mgpai View Post
Note: This script will delete links from the download list. Keep a backup of link list before running the script.

Code:
// Reset finished link, if size is zero bytes
// Trigger: A Download Stopped

if (link.finished && !link.bytesTotal) {
    link.reset();
}
It didn't work -- I got this error message.

Code:
net.sourceforge.htmlunit.corejs.javascript.EcmaError: ReferenceError: "link" is not defined. (#4)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3613)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3683)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.name(ScriptRuntime.java:1690)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1622)
	at script(:4)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:119)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
	at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212)
	at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:288)
	at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:180)
	at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:155)
Thank you for helping me with this btw!! Not sure if this is important, but I changed the trigger to JDownloader started because I couldn't make anything happen with the trigger you gave. The above message came as I opened up JDownloader.
Reply With Quote