2141
Scripts and Templates / Re: AllRovi movie script
« 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 partCode: [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
QuoteWith 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?
Only if the location was just a "Review" or "Releases" as was the case for the "Cast & Crew".