View Single Post
  #2116  
Old 02.03.2022, 09:25
armin.beispiel armin.beispiel is offline
Vacuum Cleaner
 
Join Date: Nov 2015
Posts: 19
Default Synchronous doReconnect()

I have many links to a hoster that lets me solve a captcha before JD can realize that it needs a reconnect. So, to reduce the amount of captchas by half, I want to do a reconnect after every finishing of a download. I created the following script for the trigger "Download stopped":

Code:
if (link.isFinished()) {
    doReconnect();
}
However, when the script is executed asynchronously (with checkbox in script editing dialog), only every second file is downloaded and the ones in between show the message "Hoster problem?".

When the script is executed synchronously instead, the downloads effectively stop (list looks like that without anything going on), the toolbar play icon is still disabled, the reconnect icon in the status bar isn't active and pressing the toolbar stop button accomplishes nothing. (I gave it time.) I have to restart JD to get it working again.

Synchronous execution seems like the best solution, so no download is started only shortly, followed by abortion by a reconnect. But this first needs to be made functional.

BTW: I have configured JD to run a batch file to reconnect.
Reply With Quote