Author Topic: AllRovi movie script  (Read 52582 times)

0 Members and 1 Guest are viewing this topic.

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2739
    • View Profile
Re: AllRovi movie script
« Reply #20 on: August 08, 2011, 06:47:58 pm »

 Hi Ivek23 and Rick, I already thanked you for this but hey thank you again!
 
 I have a slight problem. For some reason, Allrovi script does not gather the rating anymore. I have not changed anything to the preferences, the "additional rating" box is checked. I wonder if there was a change in the last version that caused this?

Firstly, thanks for the compliment.

I just through auto-update system transferred AllRovi script and test and Rovi rating normally works in the custom field as well as an additional rating if I change this setting
Code: [Select]

GET_RATING = False; //Set to True to add 'Rovi rating' as the standard 'Additonal rating' field

as seen above.

Well look what settings you have, there is probably key to solving the problem.

To demonstrate that everything works properly, the attached images.



[attachment deleted by admin]
« Last Edit: August 09, 2011, 09:54:44 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: AllRovi movie script
« Reply #21 on: August 08, 2011, 10:07:07 pm »
When updating data with AllRovi script for the movie Dakota (1945), I could not find this title in the results table, where several movie with the same title and a different year.
The problem is procedure ParseSearchResults in this part of code:

Thanks. I've been wondering why some search result dialogs had only two entries.

I have a slight problem. For some reason, Allrovi script does not gather the rating anymore. I have not changed anything to the preferences, the "additional rating" box is checked. I wonder if there was a change in the last version that caused this?

As Ivek had pointed out. This is a result of the default Option settings. I was overly cautious in setting some of these to 'False'. They're all controlled by Overwrite settings anyway, so I've changed them all to 'True'.

Uploading version 1.2 now.

Warning: The default options now include the updating of Actors, Duration, Poster, Alternate Rating and (Themes in) Categories. Please ensure your Overwrite fields settings are set accordingly!

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2739
    • View Profile
Re: AllRovi movie script
« Reply #22 on: August 09, 2011, 05:41:17 am »
When updating data with AllRovi script for the movie Dakota (1945), I could not find this title in the results table, where several movie with the same title and a different year.
The problem is procedure ParseSearchResults in this part of code:

Thanks. I've been wondering why some search result dialogs had only two entries.


Previously, I never came to such a problem with testing if the script is working properly, I have always found the movie title for testing in two entries.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: AllRovi movie script
« Reply #23 on: August 09, 2011, 06:33:20 am »
Quote
Previously, I never came to such a problem with testing if the script is working properly, I have always found the movie title for testing in two entries.

That's probably because they're listed by Title (exact matches) then by Year (descending) then Title (partial matches). If you search for Dakota (1945), you'll see it's third in the list of search results and therefore wasn't shown. Often duplicate titles are just an original movie and it's remake—so either one would be found in a list of two.

Had you not fixed it, I think someone would have noticed before long. ;)

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2739
    • View Profile
Re: AllRovi movie script
« Reply #24 on: August 09, 2011, 07:07:42 am »
If you search for Dakota (1945), you'll see it's third in the list of search results and therefore wasn't shown. Often duplicate titles are just an original movie and it's remake—so either one would be found in a list of two.

Yeah, I noticed this.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline deazo

  • Older Power User
  • *****
  • Posts: 283
    • View Profile
Re: AllRovi movie script
« Reply #25 on: August 09, 2011, 11:07:12 am »
Quote
I just through auto-update system transferred AllRovi script and test and rating Rovi normally works in the custom field as well as an additional rating if I change this setting
Code:

GET_RATING   = False;   //Set to True to add 'Rovi rating' as the standard 'Additonal rating' field

as seen above.

Thank you Ivek23 it now works very well and I even discovered options I was not using. ;D

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2739
    • View Profile
Re: AllRovi movie script
« Reply #26 on: August 09, 2011, 09:58:37 pm »
Thank you Ivek23 it now works very well and I even discovered options I was not using. ;D

Welcome
« Last Edit: August 09, 2011, 11:20:05 pm by rick.ca »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline RazorHall

  • User
  • ***
  • Posts: 67
    • View Profile
Re: AllRovi movie script
« Reply #27 on: August 16, 2011, 08:12:34 pm »
Still finding the occasional movie where Characteristics aren't being downloaded.  Lost Lake, for example.

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2739
    • View Profile
Re: AllRovi movie script
« Reply #28 on: August 16, 2011, 09:04:35 pm »
Part1

Still finding the occasional movie where Characteristics aren't being downloaded.  Lost Lake, for example.

Hm, same problem as in the Synopsis, as well as the same solution:
~Characteristics~ and ~Themes~ or optionally ~mfCategory~  will be postponed until the end ParseMovie, follows attempts:
View AllRovi TEST Script

EDIT:
Sorry.

Since I was unable to load code (limit exceeded by more than 20.000 lines), for examples of how and what changes, attached AllRovi test script for testing.

EDIT2:
AllRovi test2 script attached, but the details are described here.


[attachment deleted by admin]
« Last Edit: August 17, 2011, 07:20:09 pm by rick.ca »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: AllRovi movie script
« Reply #29 on: August 16, 2011, 11:36:30 pm »
Still finding the occasional movie where Characteristics aren't being downloaded.  Lost Lake, for example.

If you don't mind, please test Ivek's modified script—for both the kind of movies you've had problems with (generally, ones for which AllRovi doesn't have complete information) and other more "normal" ones. I haven't got time to test, and want to be sure we're not breaking anything else with this. Thanks.

Offline RazorHall

  • User
  • ***
  • Posts: 67
    • View Profile
Re: AllRovi movie script
« Reply #30 on: August 17, 2011, 05:54:31 am »
The test script fixed the problem for some movies, but not all.  Example: Edgar Allen Poe's Darkness.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: AllRovi movie script
« Reply #31 on: August 17, 2011, 06:55:49 am »
Thanks. I think we need to figure out what's actually going wrong with the logic of the script before releasing further changes. I assume the current version (0.1.1.2) is no worse than the previous version or Ivek's test version—that it only fails for some movies for which AllRovi does not have complete information).

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2739
    • View Profile
Re: AllRovi movie script
« Reply #32 on: August 17, 2011, 08:00:17 am »
The test script fixed the problem for some movies, but not all.  Example: Edgar Allen Poe's Darkness.

How in this case the current version works.

Thanks. I think we need to figure out what's actually going wrong with the logic of the script before releasing further changes. I assume the current version (0.1.1.2) is no worse than the previous version or Ivek's test version—that it only fails for some movies for which AllRovi does not have complete information).

Will cost us a few brain cells to figure out what is actually wrong with the logic of the script.

BTW:
I suggest that until we find solutions to these problems, current version is used, if it does not transfer all info data which are available for a particular movie, then a test version.

I hope that this combination is currently a solution for the time being to problems.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2739
    • View Profile
Re: AllRovi movie script
« Reply #33 on: August 17, 2011, 02:30:14 pm »
For many problems medicine is so, so it was also a problem with AllRovi script is also found medicine to solve problems.

So when I was looking for solutions and work tests for this one Edgar Allen Poe's Darkness movie, which has caused me many problems and I almost gave up on this , I came up thought, what if I try the current AllRovi script only copy ~Characteristics~ and added to the end ParseMovie.
I was first surprised that the script is working at all, even greater surprise was when I have the above-mentioned film, as well as Lost Lake movie transferred all info available data.
Tested about 30 movie and fine work.

See images.
AllRovi test2 script attached.

[attachment deleted by admin]
« Last Edit: August 17, 2011, 07:19:19 pm by rick.ca »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline RazorHall

  • User
  • ***
  • Posts: 67
    • View Profile
Re: AllRovi movie script
« Reply #34 on: August 17, 2011, 03:11:45 pm »
A little more progress there, but the Characteristics problem still shows up on a select few movies, such as Lustful Addiction.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: AllRovi movie script
« Reply #35 on: August 17, 2011, 11:26:31 pm »
I don't think moving routines around is the solution. I'm still not sure my solution works in all situations, but it seems to me the problem occurs when 'curPos' gets past the point in the page where the data exists (in this case, Characteristics). This can happen when the order of the data elements on the page change. Generally, the order does not change, but it can when all the usual data elements do not exist. So my solution is simply to reset 'curPos' to 'topPos' (introduced in an earlier version to solve the same issue for Rating and Genre). It seems to work for all the "problem" titles mentioned lately, and I haven't seen it break anything else. But...

Code: [Select]
//Save start position for Movie data
topPos := PosFrom('<div class="page-heading">', HTML, curPos)

...may not hold for those rare cases where what's normally a child page/tab doubles as the main page. Maybe I already have, but I'll test that once I recall an example of where we found that issue before. [Edit:] It seems I've already tested this, using Top Model and The Dallas Connection—cases where 'Cast and Crew' serves as the main page. So I think the only concern would be variations on that theme we have not yet encountered. :-\

Also, there are two issues involved with titles like Lustful Addiction. First, the AllRovi search does not find the movie. The page can only be accessed by entering the URL. (See Adult titles are there, but not discoverable?) If the PVD record has the correct URL, the script should work fine. That is, Characteristics should now be retrieved.

All this from one of my few remaining brain cells. Please torture-test the attached. ;)

[attachment deleted by admin]
« Last Edit: August 17, 2011, 11:39:28 pm by rick.ca »

Offline RazorHall

  • User
  • ***
  • Posts: 67
    • View Profile
Re: AllRovi movie script
« Reply #36 on: August 18, 2011, 02:28:13 am »
AllRovi 1.3 Candidate works perfectly on every title I've tried so far.  I'll let you know if any other weird cases should appear.  And thanks!  You guys are doing a terrific job.   :D

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: AllRovi movie script
« Reply #37 on: August 18, 2011, 06:32:04 am »
Thanks. But let's not get too excited. Most of my test titles came from you. Who knows what we'll hear from, say, the art film crowd... ;)

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2739
    • View Profile
Re: AllRovi movie script
« Reply #38 on: August 18, 2011, 02:58:41 pm »
This movies
Stargate Universe [TV Series] (2009)
Stargate Atlantis [TV Series] (2004)
Stargate Infinity [Animated TV Series] (2002)
have something in common in the Cast & Crew tab, there is only the Crew section, but is not there Cast section, so AllRovi script did not pass the info data with Section Crew.

So I ParseCast adding pieces of code
Code: [Select]
//~Cast~ or ~ctActors~
//save entire Cast tab to custom memo field, as well as individual actors.

procedure ParseCast(HTML : String);
var
curPos, endPos : Integer;
TmpStr : String;
Name, Role, URL : String;
begin
curPos := Pos('<div class="tabset-content main-tab-pane">', HTML);
if curPos < 1 then

curPos := Pos('<div class="description-box">', HTML);
if curPos < 1 then
Exit;
 
TmpStr := '';
 ...

 ...
AddCustomFieldValueByName('Cast', TmpStr);


//~Crew~
curPos := Pos('<div class="profession-box">', HTML);
if curPos < 1 then
Exit;

TmpStr := '';
 ...

 ...
end;

AddCustomFieldValueByName('Crew', TmpStr);

end;


//~Releases~


and now pass the info data with Section Crew,
(edit:) or if the Cast section and Crew section both there.

EDIT
AllRovi 1.3 candidate 1 attached.

[attachment deleted by admin]
« Last Edit: August 18, 2011, 04:45:18 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: AllRovi movie script
« Reply #39 on: August 18, 2011, 11:25:27 pm »
Quote
AllRovi 1.3 candidate 1 attached.

I haven't tested it yet, but I'm curious about this...

Code: [Select]
//~Crew~curPos := Pos('<div class="profession-box">', HTML);
if curPos < 1 then
Exit;

Did you intend to disable the setting of curPos, or did you accidentally delete the line feed?

[Edit:] You must have—it doesn't work with this line active. I've removed it.
« Last Edit: August 18, 2011, 11:45:09 pm by rick.ca »