View Single Post
  #558  
Old 31.01.2019, 06:43
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by plaintext View Post
I would like to trigger updates after a reconnect...
It might better to restart and update "Before a Reconnect". Running it "After a Reconnect", may interrupt downloads or any other activities which have started immediately after the reconnect, in which case updating while idle is a better option.

This script can also be used with "After a Reconnect" trigger.

Code:
// Restart and update, if updates are available
// Trigger: Before a Reconnect

if (callAPI("update", "isUpdateAvailable")) callAPI("update", "restartAndUpdate");

Quote:
Originally Posted by plaintext View Post
Why dont't you need to check isDonwloading() ?
It does check if downloads are running (isDownloadControllerIdle()).
Reply With Quote