Author Topic: AllMovie+(Ivek23)  (Read 6505 times)

0 Members and 1 Guest are viewing this topic.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
AllMovie+(Ivek23)
« on: April 14, 2010, 01:37:59 pm »
The AllMovie site has been replaced by AllRovi.
See AllRovi movie script for Scripts and Templates board.
Post it now in AllRovi movie script for Support board.



Here is my version and

AllMovie + (Ivek23) script.

Code: [Select]
CUSTOM FIELD mappings
Code: [Select]

//  %* ALLMOVIE CAPTION PVD FIELD FIELD TYPE

// Production Credits Tab      Production memo
// Review Tab Review memo
//  99 Run time Original duration number
//  98 Work rating AllMovie rating rating
//  52 Attributes Attributes multiselect list
//  70 MPAA + MPAA Reasons Mpaa rate memo
//  99 Category Work type select list
//  99 Color type Color type select list
//  99 Types Types multiselect list
//  93 Flags Flags multiselect list
//  99 Keywords Keywords memo
//  97 Themes Category memo
//  98 Tones Tones memo
//  74 Moods Moods multiselect list
//  20 From book (or story) Book short text
//  42 Set in Set in multiselect list
//  89 Box office Money short text
//  99 Produced by Studios memo
//  49 Release (or Premiere) Released short text
//  60 Released by Released by memo
//   0   (Date) Updated short text


Code: [Select]
Percent present in Ivek23's personal database
[attachment deleted by admin]
« Last Edit: August 06, 2011, 01:21:08 pm by Ivek23 »
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: AllMovie+(Ivek23)
« Reply #1 on: April 14, 2010, 02:11:52 pm »
Custom items in this list and work.
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: AllMovie+(Ivek23)
« Reply #2 on: April 14, 2010, 09:12:20 pm »
Just so others are not confused...This is not a fundamentally different version of my Allmovie+ script. It is, rather, an adaptation—in the manner my script was meant to be adapted.

As a modification of the nostra's original script, the general purpose of Allmovie+ is to make available as many additional data elements as possible. Following is the preamble in the script (it precedes the field mapping table presented above)...

Quote
CUSTOM AND NON-STANDARD FIELD MAPPINGS

All custom fields are optional. All standard fields can be suppressed using Preferences-Plugins-Overwrite fields. If custom names are changed in PVD, they must also be changed where they occur in the body of this script. The type of custom field used is also somewhat a matter of personal preference. A list which is for viewing only will do just as well in a long text as a multiselect field.

It is up to the user of the script to decide what fields the additional data is written to—thus the mapping table in the documentation. Where the field type (standard vs. custom) is changed from the "default," it is necessary to modify the code in the script. For example, Ivek wants Allmovie's "Tones" to be written to a custom field Tones instead of the standard field Tags. So he has changed...

AddFieldValue(mfTags, HTMLValues(HTML, to
AddCustomFieldValueByName('Tones', HTMLValues(HTML,.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: AllMovie+(Ivek23)
« Reply #3 on: April 15, 2010, 05:57:33 am »
I hope that the apology be accepted.

You are right is not new.Of course,therefore,my deep sorry for this great stupid
error.

BTW:
Other things I wanted to be helpful.
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: AllMovie+(Ivek23)
« Reply #4 on: April 15, 2010, 07:00:12 am »
No apology is necessary, Ivek. I just want others to understand it's one script that needs to be modified to suit the user's particular needs. I'm sorry I didn't thank you for demonstrating how that is done.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: AllMovie+(Ivek23)
« Reply #5 on: April 15, 2010, 07:12:22 am »
Ok,Thanks
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: AllMovie+(Ivek23)
« Reply #6 on: April 15, 2010, 05:53:28 pm »
I also edited the original script AllMovie but I do not published.

If someone is interested in you can get the code and how I edited the custom items.

List what I changed:

Rating            Stay that way
MPAA             --->transferred to AllMovie + (Ivek23) script
Aka                --->transferred to AllMovie + (Ivek23) script
Genre             --->transferred to AllMovie + (Ivek23) script
Tags               --->transferred to AllMovie + (Ivek23) script
Studio            --->transferred to AllMovie + (Ivek23) script
Box office       --->transferred to AllMovie + (Ivek23) script


Perhaps I changed something in the future I informed at least I hope.

Duration        (--->transferred to AllMovie + (Ivek23) script)

Here's the code

Code: [Select]
//Duration
 curPos := PosFrom('">', HTML, EndPos) + 2;
 EndPos := PosFrom(' ', HTML, curPos);
 
 AddFieldValue(mfDuration, Copy(HTML, curPos, EndPos - curPos));
 
 LogMessage('Duration:' + Copy(HTML, curPos, EndPos - curPos));

Replace with this code
Code: [Select]
//Duration
 curPos := PosFrom('">', HTML, EndPos) + 2;
 EndPos := PosFrom(' ', HTML, curPos);
 
 AddCustomFieldValueByName('Original Duration', Copy(HTML, curPos, EndPos - curPos));  
 
 LogMessage('Duration:' + Copy(HTML, curPos, EndPos - curPos));

and got into custom items Original duration.
« Last Edit: June 16, 2010, 12:46:39 pm by Ivek23 »
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: AllMovie+(Ivek23)
« Reply #7 on: April 15, 2010, 05:59:33 pm »
I will also shortly be uploaded image here
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: AllMovie+(Ivek23)
« Reply #8 on: April 25, 2010, 12:57:19 pm »
In AllMovie + (Ivek23), I added this:

//  %*   ALLMOVIE CAPTION      PVD FIELD         FIELD TYPE

//      Sound by            Sound by         short text
//      Ratio               Aspect Min         short text
//      Production Credits Tab         Production         memo

Here,where this copy it works:

//      Ratio               Aspect Min         short text

//Ratio
 EndPos := PosFrom('style="width: 86px;', HTML, EndPos);
 curPos := PosFrom('">', HTML, EndPos) + 2;
 EndPos := PosFrom('</td>', HTML, curPos);
 AddCustomFieldValueByName('Aspect Min', Copy(HTML, curPos, EndPos - curPos));



Code: [Select]
//Year
 curPos := PosFrom('allmovie.com/explore/year/', HTML, EndPos);
 if curPos < PosFrom('min.', HTML, EndPos) then begin
  EndPos := PosFrom('">', HTML, curPos);
 
  AddCustomFieldValueByName('Year', Copy(HTML, curPos + Length('allmovie.com/explore/year/'), 4));
  
  EndPos := EndPos + 1;
 end else
  EndPos := PosFrom('">', HTML, curPos) + 1;

 //Ratio
 EndPos := PosFrom('style="width: 86px;', HTML, EndPos);
 curPos := PosFrom('">', HTML, EndPos) + 2;
 EndPos := PosFrom('</td>', HTML, curPos);
 AddCustomFieldValueByName('Aspect Min', Copy(HTML, curPos, EndPos - curPos));


 //Duration
 curPos := PosFrom('">', HTML, EndPos) + 2;
 EndPos := PosFrom(' ', HTML, curPos);
 
// AddFieldValue(mfDuration, Copy(HTML, curPos, EndPos - curPos)); // Changed to:
AddCustomFieldValueByName('Original Duration', Copy(HTML, curPos, EndPos - curPos));  
 
 
 //Rating
 AddCustomFieldValueByName('AllMovie rating', '0');
 curPos := PosFrom('<img src="/img/st_r', HTML, EndPos);
 if curPos > 0 then begin
  curPos := PosFrom('alt="', HTML, curPos) + 5;
  EndPos := PosFrom(' ', HTML, curPos);
  
  AddCustomFieldValueByName('AllMovie rating', FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2));  
  
 end else
  curPos := EndPos;

//      Sound by            Sound by         short text

//Sound by
 AddCustomFieldValueByName('Sound by', HTMLValues(HTML,
                             '<span>Sound by</span>', '</table>',
                          '<li>', '</li>',
                          ', ', EndPos));




Code: [Select]
//From book
 AddCustomFieldValueByName('Book', HTMLValues(HTML,
                             '<span>From book</span>', '</table>',
                '<li>', '</li>',
                ', ', EndPos));


 //From story
 AddCustomFieldValueByName('Book', HTMLValues(HTML,
                             '<span>From story</span>', '</table>',
                '<li>', '</li>',
                ', ', EndPos));


//Sound by
 AddCustomFieldValueByName('Sound by', HTMLValues(HTML,
                             '<span>Sound by</span>', '</table>',
                '<li>', '</li>',
                ', ', EndPos));


 //Set in
 AddCustomFieldValueByName('Set in', HTMLValues2(HTML,
                             '<span>Set In</span>', '</table>',
                'http://www.allmovie.com/search/tag', '</a>',
                ', ', EndPos));


 //Box office
 curPos := PosFrom('<span>Box office</span>', HTML, EndPos);
 if curPos > 0 then begin
  curPos := PosFrom('<li>', HTML, curPos) + 5;
  EndPos := PosFrom('</li>', HTML, curPos);
  
  TmpStr := Copy(HTML, curPos, EndPos - curPos);
  curPos := Pos('/', TmpStr);
  if curPos > 0 then
   Delete(TmpStr, curPos, Length(TmpStr) - curPos + 1);
  curPos := Pos(':', TmpStr);
  if curPos > 0 then
   Delete(TmpStr, curPos, Length(TmpStr) - curPos + 1);
  AddCustomFieldValueByName('Money', TmpStr);
 end;

My advice to View:
starting with this AllMovie + (Ivek23) script,then this original script AllMovie
because otherwise you will AllMovie + (Ivek23) script delete Original duration
it appears that you AllMovie original script.

« Last Edit: April 25, 2010, 01:10:27 pm by Ivek23 »
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: AllMovie+(Ivek23)
« Reply #9 on: May 01, 2010, 10:32:50 am »
//  %*   ALLMOVIE CAPTION      PVD FIELD         FIELD TYPE

//      Sound by            Sound by         short text
//      Ratio               Aspect Min         short text  replaced by
//      Run Time             Run Time         short text
//      Production Credits Tab         Production         memo

Here is
Quote
//      Ratio               Aspect Min         short text
replaced by this

//      Run Time               Run Time         short text

This is also here

//Run Time  
 EndPos := PosFrom('style="width: 86px;', HTML, EndPos);
 curPos := PosFrom('">', HTML, EndPos) + 2;
 EndPos := PosFrom('</td>', HTML, curPos);
 AddCustomFieldValueByName('Run Time', Copy(HTML, curPos, EndPos - curPos));


Code: [Select]
//Year
 curPos := PosFrom('allmovie.com/explore/year/', HTML, EndPos);
 if curPos < PosFrom('min.', HTML, EndPos) then begin
  EndPos := PosFrom('">', HTML, curPos);
 
  AddCustomFieldValueByName('Year', Copy(HTML, curPos + Length('allmovie.com/explore/year/'), 4));
  
  EndPos := EndPos + 1;
 end else
  EndPos := PosFrom('">', HTML, curPos) + 1;

 //Run Time  
 EndPos := PosFrom('style="width: 86px;', HTML, EndPos);
 curPos := PosFrom('">', HTML, EndPos) + 2;
 EndPos := PosFrom('</td>', HTML, curPos);
 AddCustomFieldValueByName('Run Time', Copy(HTML, curPos, EndPos - curPos));


 //Duration
 curPos := PosFrom('">', HTML, EndPos) + 2;
 EndPos := PosFrom(' ', HTML, curPos);
 
// AddFieldValue(mfDuration, Copy(HTML, curPos, EndPos - curPos)); // Changed to:
AddCustomFieldValueByName('Original Duration', Copy(HTML, curPos, EndPos - curPos));  
 
 
 //Rating
 AddCustomFieldValueByName('AllMovie rating', '0');
 curPos := PosFrom('<img src="/img/st_r', HTML, EndPos);
 if curPos > 0 then begin
  curPos := PosFrom('alt="', HTML, curPos) + 5;
  EndPos := PosFrom(' ', HTML, curPos);
  
  AddCustomFieldValueByName('AllMovie rating', FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2));  
  
 end else
  curPos := EndPos;
« Last Edit: May 01, 2010, 10:45:24 am by Ivek23 »
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: AllMovie+(Ivek23)
« Reply #10 on: May 13, 2010, 03:17:26 pm »
A few post up here I changed (transferred) from original script AllMovie to AllMovie + (Ivek23) script.

Here, repair back to original as it was before the change.

Studio            --->back to the original
Box office        --->back to the original
Aka                --->back to the original
Genre             --->back to the original
Tags              --->back to the original
MPAA             --->back to the original   


Other and left changed so as is was.

Rating          
Duration
        
« Last Edit: June 16, 2010, 12:41:50 pm by Ivek23 »
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: AllMovie+(Ivek23)
« Reply #11 on: May 28, 2010, 06:53:04 am »
Here I added yet the script (Blue and green):

//  %*   ALLMOVIE CAPTION      PVD FIELD         FIELD TYPE

//      Genre               Genre            memo
//      Aka               Aka                  memo
//      Country            Country               long text
//      Title                     Title               long text

//      From Comic by         From Comic by             short text
//      From screenplay         From screenplay             short text
//      From material by         From material             short text
//      Film Basis            Film Basis                 short text
//      Negative Format         Negative Format              short text
//      Languages            Language                  short text
//      From Idea by         From Idea by               short text
//        From story            Story                     short text
//      Movie budget         Movie budget               short text
//        Premiere             Premiere                   short text   
//      From TV series         From TV series                short text
//      Alternate Rating         Alternate Rating                short text
//      Video Distributor         Video Distributor                 memo
//      Characters by         Characters by                 short text
//      .S. State            S. State                    short text
//      Region            Regions                    short text
//      Key name            Key name                    short text
//      From play            From play                    memo
//      Filming location         Filming location          multiselect list
//      Color type            Colors types                select list
//      Cinematic Process      Cinematic Process             select list

//      Sound by            Sound by      short text
//      Run Time            Run Time                    short text


Purple                 mean       AddFieldValue Change to AddCustomFieldValueByName
Blue                    mean                 New published
Green                 mean             published some post here and here

It works fine except in those cases when the two additions together (Which are individually works OK) on AllMovie website, the script is incorrectly classified.

Please anyone it what Addition may incorrectly works that write the title of the Film or link to Film on AllMovie Web page and I will then Tues may also Corrected the script.

Added is also script for testing.

Thanks for the suggestions on the script.

[attachment deleted by admin]
« Last Edit: May 28, 2010, 10:10:14 am by Ivek23 »
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: AllMovie+(Ivek23)
« Reply #12 on: October 17, 2010, 05:02:26 pm »
Modified version of the script AllMovie+ -Ivek23- script
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: AllMovie+(Ivek23)
« Reply #13 on: May 03, 2011, 02:53:29 pm »
Attention to important:

AllMovie script do not work anymore.
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: AllMovie+(Ivek23)
« Reply #14 on: July 13, 2011, 08:18:38 am »
The AllMovie site has been replaced by AllRovi. See AllRovi movie script.

 

anything