English > Scripts and Templates

AllRovi movie script

<< < (20/26) > >>

RazorHall:

--- Quote from: Ivek23 on July 30, 2011, 08:06:36 pm ---What are the problems then there.
--- End quote ---

It's pretty rare, but I'm finding a few movies that aren't downloading the Characteristics information.  As mentioned above, Bounty Huntress 2 is an example of this.

Ivek23:

--- Quote from: Ivek23 on July 30, 2011, 05:26:01 pm ---
This movie 10 Things I Hate About You (1999) also has a button "more" there, now that this is already correct, it would not be bad to add the option is what is hidden under the "more" button.

BTW:
It should be Synopsis move the location of the AMG ID,
--- Code: ---//AMG ID
 AddCustomFieldValueByName('AMG WID', HTMLValues(HTML,
                             '<dt>AMG ID</dt>', '</dd>',
                '<pre>', '</pre>',
                ', ', EndPos));


//Description
//modified by Ivek23 and rick.ca 07/09/2011
 curPos := PosFrom('<span>', HTML, curPos);
 endPos := PosFrom('</span>', HTML, curPos);
 TmpStr5 := TextBetween(HTML, '<span>', '</span>', True, curPos);

 curPos := PosFrom('<span>by', HTML, curPos);
 endPos := PosFrom('</span>', HTML, curPos);
 if RICK_CA then
TmpStr3 := TextBetween(HTML, '<span>by ', '</span>', True, curPos)
 else
TmpStr3 := TextBetween(HTML, '<span>', '</span>', True, curPos);

 curPos := PosFrom('<strong>', HTML, curPos);
 endPos := PosFrom('</strong>', HTML, curPos);
 TmpStr4 := TextBetween(HTML, '<strong>', '</strong>', True, curPos);

 curPos := PosFrom('<p>', HTML, curPos);
 endPos := PosFrom('</p>', HTML, curPos);
 TmpStr := Copy(HTML, curPos, EndPos - curPos);
 TmpStr1 := StringReplace(TmpStr, ' -- ', '—', True, True, False);
 TmpStr2 := StringReplace(TmpStr1, ' --- ', '—', True, True, False);
 TmpStr := StringReplace(TmpStr2, '--', '—', True, True, False);
 TmpStr1 := StringReplace(TmpStr, #13#13#13#13, #13#10#13#10, True, True, False);
 TmpStr2 := RemoveTagsEx(TmpStr1);

 if TmpStr4 = 'synopsis' then
if RICK_CA then
AddFieldValue(mfDescription, TmpStr2 + #13 + '—' + TmpStr3)
else
AddFieldValue(mfDescription, '  ~~  ' + TmpStr4 + '  ~~  ' + #13 + TmpStr2 + #13 + ' - ' + TmpStr3 )          
 else
LogMessage('No Synopsis available');

end;

--- End code ---
it will be fine, because I have done so (as well as original AllMovie script Description was at the end) and I have no problems in the functioning of the script and when the later will not more problems.

Edit: .... Description was at the end above procedure ParseSearchResults).

--- End quote ---

Do it like this as described here, and you'll see what happens then (btw: the previous version of the script before THIS change what you do, make a copy of your script and save it to a new folder,if anything it would be okay as it should be that you got a copy of the script is still available).

RazorHall:
When I move the AMG ID paragraph to where you have it, and place the "end;" after the Description section, the AllRovi plugin doesn't even show up as an option under Import anymore.   ???

rick.ca:

--- Quote ---When I move the AMG ID paragraph to where you have it, and place the "end;" after the Description section, the AllRovi plugin doesn't even show up as an option under Import anymore.
--- End quote ---

That will happen if the script causes an error in the program. If using the program with the -debug switch (recommended), the script can be recompiled from the Log (on the Help menu). If the Log is not available, restart the program. In either case, the script configuration is reset to the default (i.e., Overwrite fields... will need resetting).

rick.ca:
Version 13 attached (and to top post). Changes:

• fixed 'Characteristics' for rare records with nothing after that section
• introduced 'SavedPos' variables for recalling last good 'LastPos' when expected section not found
• added 'Genre links' for option to save Genres in a memo field as links
• changed name of PVD field from 'Types' to 'Sub-Genres' for consistency, and
• added 'Sub-Genre links' for option to save them in a memo field as links

[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version