IMDB script doesn't work

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

Re: IMDB script doesn't work

Post by antp »

I just fixed the original title (to avoid a very long text causing the issues)
At least if people get that version (4.031) that will avoid corrupting their catalog if they run it, even if it won't import much data (so it is still useless).
A lot of changes are needed in the script to get it working again.
Dorohedoro
Posts: 54
Joined: 2016-12-13 00:45:45

Re: IMDB script doesn't work

Post by Dorohedoro »

antp wrote: 2025-06-11 18:04:58 I just fixed the original title (to avoid a very long text causing the issues)
At least if people get that version (4.031) that will avoid corrupting their catalog if they run it, even if it won't import much data (so it is still useless).
A lot of changes are needed in the script to get it working again.
Thank you so much for your hard work!
Lemaireus
Posts: 92
Joined: 2014-02-14 10:18:14

Re: IMDB script doesn't work

Post by Lemaireus »

antp wrote: 2025-06-11 18:04:58 I just fixed the original title (to avoid a very long text causing the issues)
At least if people get that version (4.031) that will avoid corrupting their catalog if they run it, even if it won't import much data (so it is still useless).
A lot of changes are needed in the script to get it working again.
Thank you very much, Antoine. The fixes can come later but I'm sure many would be grateful that their catalogues did not get corrupted.
Lemaireus
Posts: 92
Joined: 2014-02-14 10:18:14

Re: IMDB script doesn't work

Post by Lemaireus »

Dorohedoro wrote: 2025-06-11 18:38:19 My catalog has over 17000 entries, imagine losing that.

You shoud make backups of that catalog ;-)
Losing a catalogue with 17000 entires would be two-and-a-half times worse than losing one with 7000. ;)

I'm glad that yours is safe and Antoine's suggestion has saved mine as well. :)
Lemaireus
Posts: 92
Joined: 2014-02-14 10:18:14

Re: IMDB script doesn't work

Post by Lemaireus »

antp wrote: 2025-06-11 18:04:58 That's what I was going to say: make backups from time to time! :)

I'll try to check the script in the next days, if someone else has time to do it before any contribution is welcome ;)
Antoine, you are the one to blame for my not doing regular backups :wink:. I started using the AMC probably around 2002 or 2003 and this is only the second time in over twenty years that I have run into a situation in which the catalogue as a whole has threatened to become corrupted. You have built a programme that is so stable that one falls out of the habit of doing backups. ;)

On a serious note, though, here is one more suggestion among the many others that have accumulated with you over the years since you wrote a major update for AMC: please provide an option to do automatic weekly or fortnightly or monthly backups so that even in the case of a malfunctioning website/script, one doesn't lose all of one's work. The default automatic backup file helps only if one hasn't hit the 'save' button without realising that the catalogue has become corrupted. Optional automatic backups can potentially save years and years of work.

I know that you no longer work actively on the catalogue, but mine is only one voice among the many urging you to please consider one major update that incorporates some of the many, many vital features that have become essential since you wrote the last major update.

As always, thank you very, very much for all that work you have put in to gift us the wonderful programme that AMC is. :)
antp
Site Admin
Posts: 9689
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: IMDB script doesn't work

Post by antp »

There is already a backup of the previous catalog, as a .bak file in the same folder as the .amc file (I think the option is enabled by default).
Of course it is only the previous state, so it can be not enough.
But you have other data to backup too, I suppose? AMC is not your only program :D
A local backup is not really enough anyway. There can be so many things that happen to such file.
The minimal would be a monthly backup to an external device.
And then you can always improve (more backups, rotation between several devices, storing at another place, etc.)
Or simply online backup solutions, now with the cloud there are more possibilities :)
Lemaireus
Posts: 92
Joined: 2014-02-14 10:18:14

Re: IMDB script doesn't work

Post by Lemaireus »

antp wrote: 2025-06-12 09:01:04 A local backup is not really enough anyway. There can be so many things that happen to such file.
. . .
Or simply online backup solutions, now with the cloud there are more possibilities :)
And Antoine yet again cleanly sidesteps a request to consider a long-overdue update. :hihi:

But yes, thank you Antoine, those are all good suggestions and I shall implement them right away. The only trouble, though, with manual backups is that the more trouble-free a programme is, the more relaxed and casual one becomes about backups. And AMC is completely trouble-free, except on occasions when IMDB decides to play spoilsport, as in the present instance.

Many thanks! :)
Dorohedoro
Posts: 54
Joined: 2016-12-13 00:45:45

Re: IMDB script doesn't work

Post by Dorohedoro »

Lemaireus wrote: 2025-06-12 08:11:00
Dorohedoro wrote: 2025-06-11 18:38:19 My catalog has over 17000 entries, imagine losing that.

You shoud make backups of that catalog ;-)
Losing a catalogue with 17000 entires would be two-and-a-half times worse than losing one with 7000. ;)

I'm glad that yours is safe and Antoine's suggestion has saved mine as well. :)
If I lose that list it will be like losing a close-knit relative.

Yeah, it's safe, and I have it backed up on several hard drives and also in the cloud.
MrObama2022
Posts: 65
Joined: 2022-02-02 00:03:55

Re: IMDB script doesn't work

Post by MrObama2022 »

I am also working on the iMDB fix. If the current version of the script has already corrupted some entries, in theory it is possible to delete the single entry, simply by selecting it and pressing DELETE on the keyboard, then you just need to recreate it and wait for the updated version of the script before populating it
Lemaireus
Posts: 92
Joined: 2014-02-14 10:18:14

Re: IMDB script doesn't work

Post by Lemaireus »

Dorohedoro wrote: 2025-06-12 18:24:14 If I lose that list it will be like losing a close-knit relative.
Aptly put. I couldn't agree more. Thanks to Antoine, at least the possibility of anyone's catalogue getting irretrievably corrupted are taken care of.
Lemaireus
Posts: 92
Joined: 2014-02-14 10:18:14

Re: IMDB script doesn't work

Post by Lemaireus »

MrObama2022 wrote: 2025-06-12 18:49:54 I am also working on the iMDB fix. If the current version of the script has already corrupted some entries, in theory it is possible to delete the single entry, simply by selecting it and pressing DELETE on the keyboard, then you just need to recreate it and wait for the updated version of the script before populating it
Thank you for working on the script. One of the problems, before Antoine fixed it, was that, after one had saved it, the corrupt entry was un-delete-able. If one tried to delete the corrupt entry, AMC would hang and the only way out was to terminate the programme through the task manager. That corrupt entry would still be there when one restarted AMC.
Valmiki
Posts: 9
Joined: 2023-11-20 21:14:07

Re: IMDB script doesn't work

Post by Valmiki »

Hello
I don't know for your guys but for me the script is still creating problems. Both on new movies and also if I run it on existing ones.

For some reasons I can't paste or attach a picture here, so I will explain in words. Basically after the script is parsed, fields are still empty. When I display the HTML version a lot of code is added to the page.

Can I do anything to help? I have little knowledge in coding but maybe there are some tasks I can learn or help with.

Thank you in advance
Lemaireus
Posts: 92
Joined: 2014-02-14 10:18:14

Re: IMDB script doesn't work

Post by Lemaireus »

Valmiki wrote: 2025-06-15 19:07:06 I don't know for your guys but for me the script is still creating problems. Both on new movies and also if I run it on existing ones.
Antoine and MrObama are still working on the script. Until the fixed version is released, Antoine has fixed the script to the extent that it no longer generates un-delete-able corrupt entries which can potentially ruin the entire catalogue.
Valmiki
Posts: 9
Joined: 2023-11-20 21:14:07

Re: IMDB script doesn't work

Post by Valmiki »

Thank you so much Lemaireus for your reply. Now I understand fully. Sorry if I didn't get it earlier.
Thank you so much to Antoine and Mr Obama for your support. Appreciated very much
boristhecat
Posts: 75
Joined: 2015-06-30 22:25:21

Re: IMDB script doesn't work

Post by boristhecat »

A decent donation for Antoine just made for his ongoing work on the script. :grinking:
Has anyone tried any other English scripts when IMDB is not working? I just tried a couple and they're not a patch on IMDB.
antp
Site Admin
Posts: 9689
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: IMDB script doesn't work

Post by antp »

Thanks ;)
I should have some time on Wednesday & Thursday to work on this, hoping it will be enough to fix the script.
The work should not be so long, I hope, as long as IMDb is not doing continuous changes (i.e. if there are difference from one movie to another, or from one day to another...)
Valmiki
Posts: 9
Joined: 2023-11-20 21:14:07

Re: IMDB script doesn't work

Post by Valmiki »

boristhecat wrote: 2025-06-17 08:40:47 A decent donation for Antoine just made for his ongoing work on the script. :grinking:
Has anyone tried any other English scripts when IMDB is not working? I just tried a couple and they're not a patch on IMDB.
I tried IMDB (Actor Images) and it is still working but it just won't do the whole job, just actor images

I also tried Italian Multisite which I tried in the past to download IMDB info in Italian and only worked to download info in English but it doesn't do anything at all now and I didn't bother to try it to configure it for other websites. IMDB is the best.
MrObama2022
Posts: 65
Joined: 2022-02-02 00:03:55

Re: IMDB script doesn't work

Post by MrObama2022 »

https://mega.nz/file/4ItVSALA#ilIAhSIlM ... NMOOFWDwLQ

THIS IS A BETA!!! I JUST TESTED IT WITH ONLY 2 TITLES!!! IF YOU WANT TO TEST, CLOSE ANT MOVIE CATALOG, OPEN C:\ProgramData\Ant Movie Catalog\Scripts WITH EXPLORER, RENAME IMDB.ifs AS IMDB.ifs.tmp AND SAVE THE ABOVE LINK IN THIS DIRECTORY, THEN OPEN ANT MOVIE CATALOG AND TEST.

It's 02:06 a.m. here in Italy and I'm sleepy, today I have to work.

So, how this should work:
- when opening AnalyzeMoviePage() if it detects the new html (aNY piece of the new json should be ok) it opens AnalyzeMoviePage2()

Code: Select all

if (Pos('"releaseYear":{"year":', PageText) > 0) then 
    AnalyzeMoviePage2(PageText)
the new AnalyzeMoviePage2 is "clean" :lol:
Ok it just uses a support procedure jsonMultipleValuesToList() to iterate inside json arrays/lists
The syntax is:

Code: Select all

jsonMultipleValuesToList(PageText, DelimiterListFrom, DelimiterListTo, DelimiterItemFrom, DelimiterItemTo: string; fieldName, limit: integer)
PageText is all html code, DelimiterListFrom and DelimiterListTo are the main delimiters, DelimiterItemFrom and DelimiterItemTo are the single value/item delimiters, fieldName is the field you want to update and limit is a limit of entry (0 = no limit)

AnalyzeMoviePage2 so is just a set of procedure calls like these ones:

Code: Select all

jsonMultipleValuesToList(PageText, '"genres":{"genres":[', ']', '"text":"', '"', fieldCategory, 0);
I have not yet tested the code for all the settings but these fields should works:
- original titles
- translated titles (BUT NOT ALL THE OPTIONS)
- directors
- writers
- composers
- countries
- year
- url
- description
- comments (I DID NOT TESTED ALL THE OPTIONS)
- trivia
- aspect ratio
- languages
- picture (BUT ONLY THE MAIN POSTER, NOT ALL THE OPTIONS)

What's not working:
- length (but I'll fix asap)

What must be checked and added:
- tagline
- audio format
- all the missing options/combo/etc. etc.
- TESTTTTTTTTTTT

There are a lot of a code to check, test, add, etc. but if you want to test ..

These code could here. Here is a formatted json (it's the json inside the html but pretty printed) and here there is the all html code as ANT Movie Catalog get
Dorohedoro
Posts: 54
Joined: 2016-12-13 00:45:45

Re: IMDB script doesn't work

Post by Dorohedoro »

MrObama2022 wrote: 2025-06-18 00:10:35 https://mega.nz/file/4ItVSALA#ilIAhSIlM ... NMOOFWDwLQ

THIS IS A BETA!!! I JUST TESTED IT WITH ONLY 2 TITLES!!! IF YOU WANT TO TEST, CLOSE ANT MOVIE CATALOG, OPEN C:\ProgramData\Ant Movie Catalog\Scripts WITH EXPLORER, RENAME IMDB.ifs AS IMDB.ifs.tmp AND SAVE THE ABOVE LINK IN THIS DIRECTORY, THEN OPEN ANT MOVIE CATALOG AND TEST.

It's 02:06 a.m. here in Italy and I'm sleepy, today I have to work.

So, how this should work:
- when opening AnalyzeMoviePage() if it detects the new html (aNY piece of the new json should be ok) it opens AnalyzeMoviePage2()

Code: Select all

if (Pos('"releaseYear":{"year":', PageText) > 0) then 
    AnalyzeMoviePage2(PageText)
the new AnalyzeMoviePage2 is "clean" :lol:
Ok it just uses a support procedure jsonMultipleValuesToList() to iterate inside json arrays/lists
The syntax is:

Code: Select all

jsonMultipleValuesToList(PageText, DelimiterListFrom, DelimiterListTo, DelimiterItemFrom, DelimiterItemTo: string; fieldName, limit: integer)
PageText is all html code, DelimiterListFrom and DelimiterListTo are the main delimiters, DelimiterItemFrom and DelimiterItemTo are the single value/item delimiters, fieldName is the field you want to update and limit is a limit of entry (0 = no limit)

AnalyzeMoviePage2 so is just a set of procedure calls like these ones:

Code: Select all

jsonMultipleValuesToList(PageText, '"genres":{"genres":[', ']', '"text":"', '"', fieldCategory, 0);
I have not yet tested the code for all the settings but these fields should works:
- original titles
- translated titles (BUT NOT ALL THE OPTIONS)
- directors
- writers
- composers
- countries
- year
- url
- description
- comments (I DID NOT TESTED ALL THE OPTIONS)
- trivia
- aspect ratio
- languages
- picture (BUT ONLY THE MAIN POSTER, NOT ALL THE OPTIONS)

What's not working:
- length (but I'll fix asap)

What must be checked and added:
- tagline
- audio format
- all the missing options/combo/etc. etc.
- TESTTTTTTTTTTT

There are a lot of a code to check, test, add, etc. but if you want to test ..

These code could here. Here is a formatted json (it's the json inside the html but pretty printed) and here there is the all html code as ANT Movie Catalog get
Can't wait to try it. Thank you so much for your hard work.
Post Reply