Page 1 of 1

Endless loop with no Internet access

Posted: 2011-12-24 10:53:04
by doveman
With AMC 4.1.0, if there's no Internet access (in my case the firewall was blocking it) and I try and e.g. run the Update All script it gives a socket error but then keeps trying repeatedly every time I click the error box with no way to quit out of it.

Posted: 2011-12-24 11:28:51
by soulsnake
I think it is because you select all movies.
So the script try to access to Internet for each of them.
Just select one movie when you run [ Update scripts ] and all should be OK.
In a future version, I will add an internal updater for that!

Soulsnake.

Posted: 2011-12-24 12:02:20
by doveman
I don't think I'd selected more than one movie, but I'll check again.

Posted: 2011-12-24 16:51:41
by antp
It may be due to the script itself (rather than a bug of the program), since this script works in loop until it is canceled.

Posted: 2011-12-28 14:11:17
by bad4u
Should happen only if you accidentally selected more than one movie when you run the script. Technically the update script wouldn't need a movie to be selected, as it doesn't access movie data in any way, but you cannot run scripts without selecting one. That's why I warned about not selecting more than one movie in the license window which comes up on the first run ;)

I think holding down the ESC button might speed up finishing the loop if that happens to you (though it still runs through all movies).

Posted: 2011-12-28 15:29:15
by soulsnake
We should modify this script to run update only if it is the first iteration (first selected movie).
For this you can use this test in main:

Code: Select all

if GetIteration = 0 then ... else do nothing
The problem is that GetIteration function only exists since AMC 4.1.0.

Soulsnake.

Posted: 2011-12-28 23:10:34
by antp
Just declare a Boolean variable "AlreadyProcessed", set it to True when you run the script, for the next movie do nothing if it is set as True (since the global variables are not reseted between movies).