[REL] [ALL] Update Script for Script Updates ! ;)

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

[REL] [ALL] Update Script for Script Updates ! ;)

Post by bad4u »

Christmas Eve an idea was born.. and the next day I decided to give it a try..

As I really like Ant Movie Catalog and made more and more friends use this fine tool, I recognized that many of them asked me when scripts didn't work proper any more, instead watching for updates on the website or forum. Maybe this is because they don't speak english or - often enough - they are just not skilled enough (and unfortunatly the scripts directory is a little bit hidden on the website, not easy to find for beginners who found the program somewhere else).

So, two evenings, a bottle of martini and half a bottle of 12year old Glenfiddich Highland Single Malt Scotch Whisky later here is my solution :p


Download : http://www.antp.be/temp/scripts/UPDATE_SCRIPTS.ifs


This script is working similar to a movie data script, but it analyses data from the AMC script update directory http://www.antp.be/temp/scripts/ . After that it checks the scripts you have installed and gives you a list of scripts that are more up-to-date than yours. Simply choose the script you want to update, hit OK and your done. The fastest, easiest and most comfortable way to update your favorite scripts ..

The script does NOT modify your database, so it is not important which film is chosen when starting the script (but a film has to be selected or you will get an error message).

Some reactions would be nice, please report any problems here !


@Antoine: Would be nice if you upload this script to the website. Maybe this could also be a good reason to update the installation package when you find some time for this ? Please look private message, too.

***

Nochmal kurz auf deutsch : Das hier vorliegende Skript wird wie ein ganz normales Filmscript aufgerufen und überprüft für welche Skripte (aller Sprachen) es Updates gibt. Es zeigt dann eine Liste mit den neueren Skriptdateien an und mit einem einfachen Klick kann die gewünschte Datei installiert werden. So einfach is dat ..

Rückmeldungen erwünscht, Probleme bitte hier melden !

***

bad4u is good4u
;)

[about "edit" - just changed the download link]
Last edited by bad4u on 2006-12-28 12:07:41, edited 1 time in total.
antp
Site Admin
Posts: 9636
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: [REL] [ALL] Update Script for Script Updates ! ;)

Post by antp »

Nice work! Why nobody (including me) thought about doing this earlier?
bad4u wrote: @Antoine: Would be nice if you upload this script to the website. Maybe this could also be a good reason to update the installation package when you find some time for this ? Please look private message, too.
Actually I am planning to add an auto-update for scripts in next version (cf the topic about version 3.5.1 beta).
But this may be a good temporary solution, I just hope that people will see it.
Well, I will already put it on my server and probably update the program installation package these days.
About HTTP trafic on my site, no problem on that site, the limit is quite high.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Re: [REL] [ALL] Update Script for Script Updates ! ;)

Post by bad4u »

antp wrote:But this may be a good temporary solution, I just hope that people will see it.
Maybe you should set topic to "sticky" just for a little while ? ;)


@all : I forgot to mention that I have tested this script under WinXP only. I'm not sure about behaviour of "cmd.exe" on other versions of Windows - I do not even know if it exists. So if someone could test this under different versions, please let me know if it works - thanks !

@alle : das Script wurde nur unter WinXP getestet, wenn jemand die Möglichkeit hat es unter anderen Windows Versionen zu testen, gebt mir bitte hier Bescheid ob es auch dort korrekt funktioniert - danke !
antp
Site Admin
Posts: 9636
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

On Windows NT and 2000 it will work.
On 95/98/ME you have to use command.com
On Vista I guess it will work, though I am not sure.
jestar
Posts: 3
Joined: 2006-12-30 18:51:37

Re: [REL] [ALL] Update Script for Script Updates ! ;)

Post by jestar »

Just tested this out (Win XP Pro w/SP2) and it worked okay. I was thinking that it would be nice to be able to select more than one script to update at one time. Also, it seems to update okay, but the same scripts are still listed as being update-able (does that make sense?). Once you update a script, it would be nice if you didn't get that same script in the update listing. There would be less confusion for the user that way.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

antp wrote:On Windows NT and 2000 it will work.
On 95/98/ME you have to use command.com
On Vista I guess it will work, though I am not sure.
I used command.com before cmd.exe, but then copying dir into a text file always shortened the filenames to 8+3 (under WinXP), even when using some commandline switches. I did not test for long, so I think it should be possible to find a solution for that or I would have to shorten the list from update server too - but are there enough users still working with W98/ME ? ;)


jestar wrote:I was thinking that it would be nice to be able to select more than one script to update at one time.
This was a feature, not a bug :D - I was worried about the traffic on the update server, so I decided to update only one script at once (if many users use a kind of 'update all' function, every update could cause more than 0.5MB traffic and I do not know how many users will use this script - it could quickly sum up to some hundred megabytes or more a month) - but most users do not need more than 2 oder 3 scripts regularly, probably only in their own language. For example I personally do not need updates for russian or french scripts ^^

But I think it would be a good idea to add a function that askes if you want to update more scripts after one has been finished. That should be no problem and it causes even less traffic than starting a complete new pass through. I'll do this asap :)

An 'update all scripts' function will be added if antp wants me to do this, too.

Also, it seems to update okay, but the same scripts are still listed as being update-able (does that make sense?). Once you update a script, it would be nice if you didn't get that same script in the update listing. There would be less confusion for the user that way.
Hmm, now you confuse me, man ^^ After updating one script, the next time this script is no longer shown on the list. Is it possible that you changed the "updated_scripts_ONLY" option to "0" ? Standard is "1", then the script checks your scripts on hdd every time you start the update and shows new scripts ONLY .. when set to "0" it will always show all the scripts from the server ..
antp
Site Admin
Posts: 9636
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

About command.com, it is strange, here it works :??: But on NT/XP that command.com is quite slow, so it is not very good to use it anyway on these systems.

It could be good to have an option to update all scripts for those that want it, but maybe not enabled by default. Most of the users will use one or two scripts only.
jestar
Posts: 3
Joined: 2006-12-30 18:51:37

Post by jestar »

bad4u wrote:
jestar wrote:
I was thinking that it would be nice to be able to select more than one script to update at one time.


This was a feature, not a bug grin - I was worried about the traffic on the update server, so I decided to update only one script at once (if many users use a kind of 'update all' function, every update could cause more than 0.5MB traffic and I do not know how many users will use this script - it could quickly sum up to some hundred megabytes or more a month) - but most users do not need more than 2 oder 3 scripts regularly, probably only in their own language. For example I personally do not need updates for russian or french scripts ^^

But I think it would be a good idea to add a function that askes if you want to update more scripts after one has been finished. That should be no problem and it causes even less traffic than starting a complete new pass through. I'll do this asap smile

An 'update all scripts' function will be added if antp wants me to do this, too.
I didn't want to update the non-English language scripts, but I did see two that I wanted to update. I can understand not wanting to suck up too much bandwidth, so I am okay with the one at a time for now. :)

bad4u also wrote:
Quote:
Also, it seems to update okay, but the same scripts are still listed as being update-able (does that make sense?). Once you update a script, it would be nice if you didn't get that same script in the update listing. There would be less confusion for the user that way.

Hmm, now you confuse me, man ^^ After updating one script, the next time this script is no longer shown on the list. Is it possible that you changed the "updated_scripts_ONLY" option to "0" ? Standard is "1", then the script checks your scripts on hdd every time you start the update and shows new scripts ONLY .. when set to "0" it will always show all the scripts from the server ..
I didn't change anything in the script. Just downloaded it into my AMC scripts directory, fired up AMC and ran the script. The IMdb script said that it was newer than mine, so I select that and click OK. The updater runs along and says that there are no errors - I click OK. I am then brought to the Results window for the updater script. I've selected Save, Save All, Skip, and Abort, with the same results - the updater script will show the IMdb script as being newer than my local copy. I've shutdown and restarted AMC with the same results. At this point, I don't know if it is working or not. :??:
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

jestar wrote:At this point, I don't know if it is working or not. :??:
Got it. You are right, it is a bug within the analyzation of UPDATE_CHECK.txt .

I couldn't see this bug cause I did not update IMDB.ifs (I just tested at random and do not use IMBD myself).

The update itself is working correct and you have the new version of IMDB.ifs on harddisk now, so no need to worry about that.

It is just that the script reads out a false date for IMDB.ifs out of the text file. This is because there is another script named "Culturalia+IMDB.ifs" in the script directory and the script searches for "IMDB.ifs". This script is dated 05.05.2005, so IMDB.ifs always is marked as "outdated". Sorry about that, I will fix it today, maybe I'll add the "update all" function in one update.

Thanks !
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

Argh.. finally got it working.

Seemed to be a simple bug, but it was not that easy to find a solution for this problem. I rewrote the main part of the script and added two new functions:

- When option New_Updates_Only is set to "1" the script first checks if there is a new version of _UPDATE_SCRIPTS.ifs on the server. If so, it recommends to update this script first.

- After updating a movie script the script now will ask if you want to continue updating. If you choose "Ok" it will build a new script list without loading additional data from the update server.

Let me know if you find more bugs ;)

Download : http://service.gmx.net/mc/7h3SeejwudztO ... TVv0WWAQgK
(temporary address, choose "GMX Media Center starten - _UPDATE_SCRIPTS.ifs - Datei - download)
jestar
Posts: 3
Joined: 2006-12-30 18:51:37

Post by jestar »

bad4u wrote:Argh.. finally got it working.

Seemed to be a simple bug, but it was not that easy to find a solution for this problem. I rewrote the main part of the script and added two new functions:

- When option New_Updates_Only is set to "1" the script first checks if there is a new version of _UPDATE_SCRIPTS.ifs on the server. If so, it recommends to update this script first.

- After updating a movie script the script now will ask if you want to continue updating. If you choose "Ok" it will build a new script list without loading additional data from the update server.

Let me know if you find more bugs ;)

Download : http://service.gmx.net/mc/7h3SeejwudztO ... TVv0WWAQgK
(temporary address, choose "GMX Media Center starten - _UPDATE_SCRIPTS.ifs - Datei - download)
That was fun - glad you gave very detailed instructions on how to get the update as my German(?) isn't very good. As an American, my English probably isn't very good either. :hihi:

At any rate, got the new update script and ran it through a couple of other language scripts (all of the English scripts were updated) and things seemed to go just fine. Great work! Now go celebrate the New Year! :)
draco31.fr
Posts: 191
Joined: 2005-08-11 19:27:15
Location: Toulouse (31), France

Post by draco31.fr »

Great ! Thank you for this useful script !
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

Thanks :)

@all : Could someone from France test the latest version (v.1.1.1) of the script with "Monsieur Cinéma" and tell me the result, please ? There was a problem with the special character "é" when copying the directory into the textfile , and I want to know if the fix works with other language versions of WinXP (I'm using the german version).

If you have the latest version of this script on harddisk, you should delete the scriptfile for testing so that it shows up on the update list again. Now start the update of "Monsieur Cinéma" and next time the script should dissapear from the list again.

As I don't have a possibility to test it myself, it would be nice to know if the script is working under Windows Vista, too.

Windows 95/98/ME should work with the script when option "autodetect_new_scripts" is turned to "0" (this option shows ALL scripts from the server). No autodetection of latest scripts then, but updating still is quite comfortable.
draco31.fr
Posts: 191
Joined: 2005-08-11 19:27:15
Location: Toulouse (31), France

Post by draco31.fr »

It seems to work for Monsieur Cinéma and my French Windows XP configuration. The script downloaded is the version 5.5.

Can't test on Vista, sorry.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

@draco : Thanks for this information.

@Antoine : Would you be so kind then and upload the latest version of this script please (the link above is still working). I did some testing the last days and I did not find any more bugs in moment.
antp
Site Admin
Posts: 9636
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

done ;) I guess that the script will update itself for people that use it? :D
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

antp wrote:done ;) I guess that the script will update itself for people that use it? :D
Unfortunately not, as the first version of the script had no "auto update" function for itself - but it will show the latest version of "_UPDATE_SCRIPTS.ifs" in the scripts update list.

The current version will check for newer versions on the server, so that future updates of the script will be no problem.

Sorry, maybe it would have been better this version had been included in the repackage of the installation program. But that's life, nobody is perfect, especially not me ;)
draco31.fr
Posts: 191
Joined: 2005-08-11 19:27:15
Location: Toulouse (31), France

Post by draco31.fr »

bad4u wrote:
antp wrote:On Windows NT and 2000 it will work.
On 95/98/ME you have to use command.com
On Vista I guess it will work, though I am not sure.
I used command.com before cmd.exe, but then copying dir into a text file always shortened the filenames to 8+3 (under WinXP), even when using some commandline switches. I did not test for long, so I think it should be possible to find a solution for that or I would have to shorten the list from update server too - but are there enough users still working with W98/ME ? ;)
Can't you make an option for the user to chose if he wants to use "command" (on Win9x systems) or "cmd" (for WinXP systems) ?
And if no "cmd.exe" can be found, the script could download it from internet and place it in the script directory : then long-name and unique script can be used even on Win9x !
I tested that for exemple to simulate a "command" instruction on a Win9x system

Code: Select all

command /c d:\cmd /c dir d:\*.* > d:\test3.txt
(I'm not sure that what I am writing in english is "understanding", I can write in french if you want !)
Last edited by draco31.fr on 2007-01-05 19:06:57, edited 1 time in total.
antp
Site Admin
Posts: 9636
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

bad4u wrote:but it will show the latest version of "_UPDATE_SCRIPTS.ifs" in the scripts update list.
That's what I wanted to mean ;) It is enough I think
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

draco31.fr wrote:Can't you make an option for the user to chose if he wants to use "command" (on Win9x systems) or "cmd" (for WinXP systems) ?
And if no "cmd.exe" can be found, the script could download it from internet and place it in the script directory : then long-name and unique script can be used even on Win9x !
I tested that for exemple to simulate a "command" instruction on a Win9x system

Code: Select all

command /c d:\cmd /c dir d:\*.* > d:\test3.txt
I don't think it would be legal to offer cmd.exe for download, as far as i know it is a native Microsoft Win32 program and only available as a part of specific Windows Versions :p

Nevertheless it should be possible to add an option for a command.com version (and maybe under Win9x the filenames are not shortened to 8+3 when copying dir>>file), but then I will have to install Win98 into a virtual machine first, so that I can test the script reasonable. It's just that I thought there might be not enough users still running Win95/98/ME, but if some users want me to do this, I will add an option soon - else there are some ideas on my mind that have higher priority for me (for example a multilanguage option)
draco31.fr wrote:(I'm not sure that what I am writing in english is "understanding", I can write in french if you want !)
Uhh, I think my french is restricted to something like "Je ne parle francais" .. and this might be even wrong .. but understandable :D
Post Reply