Author Topic: AllRovi movie script  (Read 122075 times)

0 Members and 1 Guest are viewing this topic.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2738
    • View Profile
Re: AllRovi movie script
« Reply #120 on: August 02, 2011, 06:11:42 am »
Quote
But when I look at this, it seems rather silly. If Ivek would just concede my Description and Review are much prettier than his, we could do away with this confusing option.

Description and Review to be only this
Code: [Select]
AddCustomFieldValueByName('Review', TmpStr2 + #13 + '—' + TmpStr3);
and this
Code: [Select]
AddFieldValue(mfDescription, TmpStr2 + #13 + '—' + TmpStr3);
Remove about this one part
Code: [Select]
if RICK_CA then
...
 else
AddCustomFieldValueByName('Review', '  ~~  ' + TmpStr4 + '  ~~  ' + #13 + TmpStr2 + #13 + ' - ' + TmpStr5 );

and this
Code: [Select]
if RICK_CA then
...
 else
AddFieldValue(mfDescription, '  ~~  ' + TmpStr4 + '  ~~  ' + #13 + TmpStr2 + #13 + ' - ' + TmpStr3 );

Quote
If the Releases link is not wanted, mfFeatures can be disabled in  Overwrite fields..., so it's not necessary for that.

I agree, but 'procedure ParseDVDRelease' drop in the script like this
Code: [Select]
(*
procedure ParseDVDReleases(HTML : String);
var
 curPos, EndPos : Integer;
 TmpStr : String;
 Name, Role, Years, Disc, URL : String;
begin
 curPos := Pos('<div class="tabset-content main-tab-pane">', HTML);
 if curPos < 1 then
  Exit;

  TmpStr := '';
  
  EndPos := curPos;
  EndPos := PosFrom('<td class="first">', HTML, curPos);
  curPos := PosFrom('<span>', HTML, EndPos) + 6;
  EndPos := PosFrom('</span>', HTML, curPos);
  Disc := Trim(Copy(HTML, curPos, EndPos - curPos));  
    
  EndPos := curPos;
  curPos := PosFrom('http://www.allrovi.com/movies/movie/', HTML, curPos);
  while (curPos > 0) AND (curPos < PosFrom('</table>', HTML, EndPos)) do begin
   EndPos := PosFrom('">', HTML, curPos);
  
   URL := Copy(HTML, curPos, EndPos - curPos);
  
   curPos := EndPos + 2;
   EndPos := PosFrom('</a>', HTML, curPos);
  
   Name := Copy(HTML, curPos, EndPos - curPos);
  
   curPos := PosFrom('>', HTML, EndPos);
   if curPos > 0 then begin
    curPos := curPos + 2;
    EndPos := PosFrom('</div>', HTML, curPos);
  
   //modified by rick.ca 07/11/2011 to remove unwanted tag
    Role := Copy(Trim(Copy(HTML, curPos + 13, EndPos - curPos - 13)), 20, EndPos - curPos - 19);
   end else begin
    Role := '';  
    curPos := EndPos;
   end;

  EndPos := curPos;
  EndPos := PosFrom('<td>', HTML, curPos);
  curPos := PosFrom('<td>', HTML, EndPos) + 4;
  EndPos := PosFrom('</td>', HTML, curPos);
  Years := Trim(Copy(HTML, curPos, EndPos - curPos));
 
 //modified by rick.ca 07/19/2011 to include only 'Name' in link
   if TmpStr <> '' then
    TmpStr := TmpStr + #13;
   if URL <> '' then
    TmpStr := TmpStr + '<link url="' + URL + '">';
   TmpStr := TmpStr + Name + '</link>';
   if Role <> '' then
    TmpStr := TmpStr + '  •  ' + Role;
   if Years  <> '' then
    TmpStr := TmpStr + '  •  ' +  Years;

   if curPos > 0 then
    curPos := PosFrom('http://www.allrovi.com/movies/movie/', HTML, curPos)
   else
    Exit;  
  end;

  AddCustomFieldValueByName('DVDs RoviLink', TmpStr);
 end;
*)
if anyone would like details for the 'Releases' page.

Quote
I'm also curious why you need to save a custom Title. Is that because you use mfTitle for titles translated to you native language

Not quite so, but the particular movie title is title written in the original title as it is my movie title.
Example of what I mean by that:
My movie title is A Fistful Of Dynamite (A Fistful of Dynamite Australia (imdb display title) / UK / USA (alternative title)), original movie title is Giu la testa (1971).

Quote
Quote
With a similar code would also have movie title also recovered in the "Review or Releases".

Sorry, I don't understand. Do we need to make further changes? :o

Only if the location was just a "Review" or "Releases" as was the case for the "Cast & Crew".

« Last Edit: August 02, 2011, 08:22:43 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 #121 on: August 02, 2011, 11:18:18 pm »
Version 17 attached (and to top post). Changes:

• custom fields enclosed in '~' so easier to find in script with search
• updated 'Field Use' documentation
• changed name of custom fields to comply with Rovi terminology:   
    Rovi Awards   to   Awards
    Work type      to   Category.Rovi   (not to be confused with mfCategory)
    Production      to   Crew
    Rovi DVD       to   Releases
• removed RICK_CA options
• cleaned-up code and removed revision comments

Are we done yet;)

[attachment deleted by admin]

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2738
    • View Profile
Re: AllRovi movie script
« Reply #122 on: August 03, 2011, 05:41:25 am »
Quote
Are we done yet?

Let us hope that we AllRovi not prepared some more unpleasant surprise unless of course something positive to add to the script then it is now almost final script correctly for users, which now will not happen to error or confusion about what info data are transferred in standard or custom field.

Now we can say:
This is it and ready for all other registered or unregistered users in the Download section.
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 #123 on: August 03, 2011, 06:59:30 pm »
Quote
Let us hope that we AllRovi not prepared some more unpleasant surprise...

I'm not worried. I know my co-author will monitor the situation closely, and make changes before I even realize they're necessary. ;D

Once again, Ivek, thanks very much for your hard work and persistence in making this script possible.

Quote
This is it and ready for all other registered or unregistered users in the Download section.

It should be included in the auto-update system. Nostra would have to explain to us how and where to upload updated scripts. I assume they just need to be put in a particular directory (and it may be the same as that used for files in the Download section), but I don't know. :-\

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2738
    • View Profile
Re: AllRovi movie script
« Reply #124 on: August 03, 2011, 07:44:36 pm »
Quote
I'm not worried. I know my co-author will monitor the situation closely, and make changes before I even realize they're necessary.

I will monitor if any changes, unless something unexpected comes in between that I could not.

Quote
Once again, Ivek, thanks very much for your hard work and persistence in making this script possible.

Pleased to meet you and thank you too Rick.ca for substantial help in correcting that right now the script works better and looks for the correct text in it.

Quote
Quote
This is it and ready for all other registered or unregistered users in the Download section.

It should be included in the auto-update system. Nostra would have to explain to us how and where to upload updated scripts. I assume they just need to be put in a particular directory (and it may be the same as that used for files in the Download section), but I don't know.

Would not it be bad that the explain how to upload.



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 #125 on: August 04, 2011, 02:00:40 am »
As indicated in the top post...

Quote
This script has now been released and is available via the program's auto-update system. Run Help > Check for updates and choose AllRovi from the list. Post any comments or questions to the Support forum.

...so locking this topic now.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2738
    • View Profile
Re: AllRovi movie script
« Reply #126 on: January 07, 2014, 12:11:24 pm »
Notice:

AllRovi script does not work anymore.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


 

anything