English > Scripts and Templates

AllRovi movie script

<< < (25/26) > >>

Ivek23:

--- 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.
--- End quote ---

Description and Review to be only this

--- Code: ---AddCustomFieldValueByName('Review', TmpStr2 + #13 + '—' + TmpStr3);

--- End code ---
and this
--- Code: ---AddFieldValue(mfDescription, TmpStr2 + #13 + '—' + TmpStr3);

--- End code ---
Remove about this one part

--- Code: ---if RICK_CA then
...
 else
AddCustomFieldValueByName('Review', '  ~~  ' + TmpStr4 + '  ~~  ' + #13 + TmpStr2 + #13 + ' - ' + TmpStr5 );


--- End code ---
and this

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

--- End code ---


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

I agree, but 'procedure ParseDVDRelease' drop in the script like this

--- Code: ---(*
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;
*)

--- End code ---
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
--- End quote ---

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".
--- End quote ---

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

--- End quote ---

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

rick.ca:
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]

Ivek23:

--- Quote ---Are we done yet?
--- End quote ---

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.

rick.ca:

--- Quote ---Let us hope that we AllRovi not prepared some more unpleasant surprise...
--- End 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. ;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.
--- End quote ---

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. :-\

Ivek23:

--- 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.
--- End quote ---

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.
--- End quote ---

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.
--- End quote ---

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.
--- End quote ---

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



Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version