View Single Post
Old 31.01.2019, 06:43
mgpai mgpai is offline
Script Master
Join Date: Sep 2013
Posts: 444

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.

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

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

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