Endless loop with no Internet access

You found an error in the program ? Report it here
Post Reply
doveman
Posts: 32
Joined: 2011-09-17 09:58:35

Endless loop with no Internet access

Post 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.
soulsnake
Posts: 756
Joined: 2011-03-14 15:42:20
Location: France

Post 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.
doveman
Posts: 32
Joined: 2011-09-17 09:58:35

Post by doveman »

I don't think I'd selected more than one movie, but I'll check again.
antp
Site Admin
Posts: 9714
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post 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.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post 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).
soulsnake
Posts: 756
Joined: 2011-03-14 15:42:20
Location: France

Post 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.
antp
Site Admin
Posts: 9714
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post 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).
Post Reply