English > Scripts and Templates

AllRovi movie script

<< < (22/26) > >>

Ivek23:
1. )

--- Code: ---//Genres  
 //modified by rick.ca 07/30/2011 to add custom field
 endPos := topPos;
 TmpStr := HTMLValues(HTML,
'<dt>genres</dt>', '</dd>',
'">', '</a></li>',
',  ', endPos);
 AddFieldValue(mfGenre, TmpStr)
 AddCustomFieldValueByName('Genres', TmpStr)

--- End code ---
This code does not work for me - does not transfer data info.


2. )

--- Code: ---//Genres  
 //modified by rick.ca 07/30/2011 to add custom field

 TmpStr := HTMLValues(HTML,
'<dt>genres</dt>', '</dd>',
'">', '</a></li>',
',  ', endPos);
 AddFieldValue(mfGenre, TmpStr)
 AddCustomFieldValueByName('Genres', TmpStr)

--- End code ---
While this works for me - the correct data transfer standard info box in the custom field is doubling the first word (example: Drama, Drama, Romance).



3. )

--- Code: ---//Genres  
 //modified by rick.ca 07/30/2011 to add custom field
 
 TmpStr := HTMLValues2(HTML,
'<dt>genres</dt>', '</dd>',
'<li>', '</li>',
',  ', EndPos);
 AddFieldValue(mfGenre, TmpStr)
AddCustomFieldValueByName('Genres', TmpStr)

--- End code ---
This is working properly - the correct data transfer standard info box and in the custom field (example: Drama, Romance).

RazorHall:
I haven't done a lot of testing yet, but have noticed a couple things...

First, in cases where there's a "More" button for themes, the script seems to be getting the first theme under "More" but not any others listed below it.  A step in the right direction, though!  :D

Also, themes for certain films aren't being downloaded.  A few examples are Dark Reality, Street Vengeance, and Hot Target.

Ivek23:

--- Quote ---First, in cases where there's a "More" button for themes, the script seems to be getting the first theme under "More" but not any others listed below it.  A step in the right direction, though!
--- End quote ---

This one
--- Quote ---but not any others listed below it
--- End quote ---
is not true for example 10 Things I Hate About You (1999) pass this
--- Quote ---Similarity, High School Life, Love Triangles, Opposites Attract, Schemes and Ruses, Cliques, New Kid in Town, Sibling Relationships
--- End quote ---
in this code
--- Code: --- //Themes (Category)
 //modified by rick.ca 07/09/2011
  TmpStr1 :='';
  TmpStr2 :='';
 TmpStr1 := HTMLValues(HTML,
'data-typeOp=', '</div>',
'">', '</button>',
', ', endPos);
 TmpStr2 := HTMLValues(HTML,
'<div class=''morebox''>', 'div></div>',
'''>', '</div>',
', ', endPos);
 if TmpStr2 = '' then
  TmpStr := TmpStr1
 else
  TmpStr := TmpStr1 + ', ' + TmpStr2;
 TmpStr := StringReplace(TmpStr, 'More, ', '', true, true, true);
 TmpStr := StringReplace(TmpStr, ' A ', ' a ', true, false, true);
 TmpStr := StringReplace(TmpStr, ' An ', ' an ', true, false, true);
 TmpStr := StringReplace(TmpStr, ' And ', ' and ', true, false, true);
 TmpStr := StringReplace(TmpStr, ' & ', ' and ', true, false, true);
 TmpStr := StringReplace(TmpStr, ' By ', ' by ', true, false, true);
 TmpStr := StringReplace(TmpStr, ' For ', ' for ', true, false, true);
 TmpStr := StringReplace(TmpStr, ' From ', ' from ', true, false, true);
 TmpStr := StringReplace(TmpStr, ' In ', ' in ', true, false, true);
 TmpStr := StringReplace(TmpStr, ' Into ', ' into ', true, false, true);
 TmpStr := StringReplace(TmpStr, ' Of ', ' of ', true, false, true);
 TmpStr := StringReplace(TmpStr, ' On ', ' on ', true, false, true);
 TmpStr := StringReplace(TmpStr, ' Over ', ' over ', true, false, true);
 TmpStr := StringReplace(TmpStr, ' The ', ' the ', true, false, true);
 TmpStr := StringReplace(TmpStr, ' To ', ' to ', true, false, true);
 TmpStr := StringReplace(TmpStr, ' Under ', ' under ', true, false, true);
 TmpStr := StringReplace(TmpStr, ' With ', ' with ', true, false, true);

 if GET_THEMES then
AddFieldValue(mfCategory, TmpStr);
 AddCustomFieldValueByName('Themes', TmpStr)

--- End code ---
However, in the custom field with the same code like this
--- Quote ---Similarity, High School Life, Love Triangles, Opposites Attract, Schemes and Ruses, Schemes and Ruses, Cliques, New Kid in Town, Sibling Relationships
--- End quote ---
underline is doubled.

RazorHall:

--- Quote from: Ivek23 on July 31, 2011, 08:12:01 pm ---This one is not true with this code
--- End quote ---

But that's not an official part of the script yet, is it?  So I'd have to go in and replace that section every time a new version was released, yes?  I also don't like that it puts "Similarity" among the themes.

Ivek23:

--- Quote from: RazorHall on July 31, 2011, 08:34:03 pm ---
--- Quote from: Ivek23 on July 31, 2011, 08:12:01 pm ---This one is not true with this code
--- End quote ---

But that's not an official part of the script yet, is it?  
--- End quote ---

It is true that this part of the revised Rick.ca code, since the earlier part of his code, which was transferred there last theme is the "more" button.


--- Quote from: RazorHall on July 31, 2011, 08:34:03 pm ---So I'd have to go in and replace that section every time a new version was released, yes?
--- End quote ---
Unfortunately yes, because otherwise you script will not work exactly right.


--- Quote from: RazorHall on July 31, 2011, 08:34:03 pm ---  I also don't like that it puts "Similarity" among the themes.

--- End quote ---
Yes, all the theme, which they have written there are also transferred, as well as in the "Similarity" button are there links to Movies.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version