English > Talk
Alternative
VVV_Easy_Programing:
We are near to publish a "complete" beta versión. Some anwsers:
--- Quote ---It is also suggested to add the Technical Specs and User Reviews and Custom Fields codes, since these two were also in the Imdb movie plugin.
--- End quote ---
In the last beta, I put the Movie Technical Specs in the ~features~ field in all scripts. It seems the "thought" of Nostra for this field.
Today the MOD version has 5 custom fields:
Set (Short Text), TOP_250 (Number), IMDB_Votes (Number), TheMoviedb_Votes (Number), FilmAffinity_Votes (Number)
I would like to use the most of the PVD fields and not have to increase more custom fields until the version was stable.
For instance IMDB_ID is easily got from URL movie: string between the "http://www.imdb.com/title/" and "/" (line 1132-Beta 1).
--- Quote ---... users of the Russian section ...
--- End quote ---
Great! I suppose there are many Russian PVD users. The translated versions of the scripts are made with ecobyte-ReplaceText and a file translation file text. I'll include this files in the next versión for further languages.
BTW, I don't see too many returns from the users now so I hope that when we publish the first version the people will start using it and telling us their discovers (bugs) and their wishes.
Today, I have two main "concerns": people who leave PVD because it does not work and new people who enter in the PVD page and can not find an easy functional version to use.
Ivek23:
The Beta 1 version
IMDB_ [EN] [HTTPS] script
Example:
Poster for Alexander Jamieson movie is in 7200*10800 resolution, which is very too long and long lasts, and then opens for a long time in PVD.
The proposal for the highest uploaded resolution of the posters should be 1200*1500, which is the limit that then works fine for the good functioning of PVD.
For the description, it is necessary to change the condemned part of the code with this part of the code added below.
--- Quote ---Function ParsePage_IMDBMovieBASE(HTML:String):Cardinal; //BlockOpen
//Returns:
// Result:=prFinished; Script has finished gathering data
// Result:=prError; If not results
//Retrieve: ~title~, ~year~, ~origtitle~, ~poster~ / ~imdbrating~, ~IMDB_Votes~ (Custom Field) / ~TOP_250~(Custom Field) /
// If Not(GET_FULL_CREDIT): ~crew~ctDirectors,ctWriters,ctComposers,ctProducers(Not in base page), ctActors
// ~description~ / ~category~ "keywords" / ~tagline~ / ~genre~
// If Not(GET_FULL_MPAA) ~mpaa~
// ~country~ / ~rdate~ in contry provider local IP geolocation
// If Not(GET_FULL_AKA) ~aka~.
// ~budget~ / ~money~ / ~studio~ "Production Co"
// If GET_FEATURES ~features~
Var
debug_pos1:Integer;
curPos,endPos,index:Integer;
ItemValue,ItemList:String;
titleValue:String;
Name,Role,PersonURL:String;
IMDb_ID:String;
Begin
.
.
.
//Get ~description~
If Pos('<h2>Storyline</h2>',HTML)>0 then begin
EndPos:= Pos('<h2>Storyline</h2>', HTML);
curPos:=Pos('<h2>Storyline</h2>',HTML); //WEB_SPECIFIC.
If 0<curPos Then Begin
ItemValue:=TextBetWeen(HTML,'<h2>Storyline</h2>','<span class="see-more inline">',false,curPos); //Strings which opens/closes the data. WEB_SPECIFIC
ItemValue := StringReplace(ItemValue, 'Industry information at your fingertips', '', true, false, true);
ItemValue := StringReplace(ItemValue, 'Some parts of this page won'+#39+'t work property. Please reload or try later.', '', true, false, true);
debug_pos1:=Pos('Written by',ItemValue);
if debug_pos1 >0 then ItemValue := Copy(ItemValue,0,debug_pos1-1);
AddFieldValueXML('description',ItemValue);
LogMessage(' Get result description:'+ItemValue+'||');
End;
End;
--- End quote ---
This part of the code passes every description, which is and exists on the website.
Small fixes in code sections for Runtime
--- Quote --- //Get "Runtime" (in minutes)
curPos:=Pos('<h4 class="inline">Runtime:</h4>',HTML); //WEB_SPECIFIC.
If 0<curPos Then Begin
ItemValue:=TextBetWeen(HTML,'M">',' min</time>',false,curPos); //Strings which opens/closes the data. WEB_SPECIFIC
ItemList:=ItemList+'Original Runtime: '+ItemValue+' min.<br>';
LogMessage(' Get result Original Runtime:'+ItemValue+'||');
AddFieldValue(mfDuration,ItemValue);
LogMessage(' Get result lenght:'+ItemValue+'||');
End;
--- End quote ---
Sound Mix
--- Quote --- //Get "Sound Mix" (several values in a comma separated list)
curPos:=Pos('<h4 class="inline">Sound Mix:</h4>',HTML);
if 0<curPos then begin
ItemValue:=RemoveTags(TextBetWeen(HTML,'<h4 class="inline">Sound Mix:</h4>','</div>',false,curPos), false); //WEB_SPECIFIC.
ItemValue:=StringReplace(ItemValue,'| ',', ',True,True,False); //WEB_SPECIFIC.
ItemValue:=StringReplace(ItemValue,'(', ' (',True,True,False);
ItemList:=ItemList+'Sound Mix: '+ItemValue+'<br>';
LogMessage(' Get result Sound Mix:'+ItemValue+'||');
End;
--- End quote ---
Color
--- Quote --- //Get "Color" (several values in a comma separated list)
curPos:=Pos('<h4 class="inline">Color:</h4>',HTML);
if 0<curPos then begin
ItemValue:=TextBetWeen(HTML,'<h4 class="inline">Color:</h4>','</div>',false,curPos);
ItemValue:=StringReplace(ItemValue,'| ',', ',True,True,False); //WEB_SPECIFIC.
ItemValue:=StringReplace(ItemValue,'(', ' (',True,True,False);
ItemList:=ItemList+'Color: '+ItemValue+'<br>';
LogMessage(' Get result Color:'+ItemValue+'||');
End;
--- End quote ---
VVV_Easy_Programing:
The Beta 2 Release Candidate version with (EN, ES, FR in TheMovieDB) and (ES, EN in FilmAffinity) (you can hide/activate in Script Configuration).
http://vvveasy.altervista.org/wp-content/uploads/2018/06/PersonalVideoDB_MOD-V.Beta_.2.RC_.zip
Beta Testers: Run NOW with "debug.bat". So if you have problems, please is very important the name of the movie and attach the file: PersonalVideoDB\log.txt
----------------------------------------------------------------------------------------------------------------
"Dirty" own PVD installation/collection adaptation:
Important: Make a secure copy and a test copy of your own actual PDV installation.
Unzip the beta versión and change the folders: Scripts and Plugings of your test copy.
Run PVD in portable mode (portable.bat) without internet proxi.
In Preferences/Movies/Custom Ítems add the fields:
Set (Short Text), TOP_250 (Number), IMDB_Votes (Number), TheMoviedb_Votes (Number), FilmAffinity_Votes (Number)
----------------------------------------------------------------------------------------------------------------
Corrected:
1) Description issues (Ivek23 code).
2) Small fixes in code sections for Runtime (Ivek23 code)
3) Added birthplace in IMDB People
4) IMDB images begin to redirect to HTTPS URL's so added a DownloadImage function in order to download Movie Poster and People Photo by the script and not by PVD Get funtion. Not applied (still?) to the SearchList posters/photos because we would need a lot of intermediate files (better use TheMovieDB script to identify the movie/person and their IMDB ID).
Ivek23:
--- Quote ---The proposal for the highest uploaded resolution of the posters should be 1200*1500, which is the limit that then works fine for the good functioning of PVD.
--- End quote ---
I'm agree and I know that if the script add some numbers in the image url name it can ask for a dowload size, but I don't know very well if it is universal.
Have you some informations or code proposals in this line?
Ivek23:
IMDB_ [EN] [HTTPS] script
--- Quote from: VVV_Easy_Programing on June 10, 2018, 10:07:17 am ---The Beta 2 Release Candidate version
Ivek23:
--- Quote ---The proposal for the highest uploaded resolution of the posters should be 1200*1500, which is the limit that then works fine for the good functioning of PVD.
--- End quote ---
I'm agree and I know that if the script add some numbers in the image url name it can ask for a dowload size, but I don't know very well if it is universal.
Have you some informations or code proposals in this line?
--- End quote ---
Perhaps this part of the code is just the right solution for the resolution of posters.
--- Quote --- //Get ~title~, ~year~, ~origtitle~, ~poster~
//Get all "raw" title summary (in raw because we need the hidden links, we avoid "complete" token in strings which opens/closes)
ItemList:=TextBetWeenFirst(HTML,'<div class="title_wrapper"','div class="plot_summary_wrapper">'); //WEB_SPECIFIC.
If (Length(ItemList)>0) Then Begin
titleValue:=TextBetWeenFirst(ItemList,'<h1 itemprop="name" class="">','<'); //Strings which opens/closes the data. WEB_SPECIFIC
AddFieldValueXML('title',titleValue);
LogMessage(' Get result title:'+titleValue+'||');
ItemValue:=TextBetWeenFirst(ItemList,'(',')'); //Strings which opens/closes the data. WEB_SPECIFIC
AddFieldValueXML('year',ItemValue);
LogMessage(' Get result year:'+ItemValue+'||');
ItemValue:=TextBetWeenFirst(ItemList,'<div class="originalTitle">','<'); //Strings which opens/closes the data. WEB_SPECIFIC
If (Length(ItemValue)=0) Then ItemValue:=titleValue; //Provider hides the original title if same that title. WEB_SPECIFIC
AddFieldValueXML('origtitle',ItemValue);
LogMessage(' Get result origtitle:'+ItemValue+'||');
ItemValue:=TextBetWeenFirst(ItemList,BASE_URL_IMAGE_PRE_TRUE,'.'); //Get poster code. Strings which opens/closes the data. WEB_SPECIFIC
if (Length(ItemValue)>0) then ItemValue:=BASE_URL_IMAGE_PRE + ItemValue + '._V1_UY1200_.jpg'; //WEB_SPECIFIC
if ItemValue <> '' then AddImageURL(itPoster,ItemValue)
else AddImageURL(itPoster,'http://ia.media-imdb.com/images/G/01/imdb/images/logos/imdb_fb_logo-1730868325._CB499606982_.png');
LogMessage(' Get result poster:'+ItemValue+'||');
End;
--- End quote ---
It works, but we'll see more tests if it's really the way it should be.
Ivek23:
Also, Imdb Movie Poster script can help in the solution of posters.
[Imdb Movie Poster script is an added.
--- Quote from: Ivek23 on June 10, 2018, 02:32:27 pm ---IMDB_ [EN] [HTTPS] script
--- Quote from: VVV_Easy_Programing on June 10, 2018, 10:07:17 am ---The Beta 2 Release Candidate version
Ivek23:
--- Quote ---The proposal for the highest uploaded resolution of the posters should be 1200*1500, which is the limit that then works fine for the good functioning of PVD.
--- End quote ---
I'm agree and I know that if the script add some numbers in the image url name it can ask for a dowload size, but I don't know very well if it is universal.
Have you some informations or code proposals in this line?
--- End quote ---
Perhaps this part of the code is just the right solution for the resolution of posters.
--- Quote --- //Get ~title~, ~year~, ~origtitle~, ~poster~
//Get all "raw" title summary (in raw because we need the hidden links, we avoid "complete" token in strings which opens/closes)
ItemList:=TextBetWeenFirst(HTML,'<div class="title_wrapper"','div class="plot_summary_wrapper">'); //WEB_SPECIFIC.
If (Length(ItemList)>0) Then Begin
titleValue:=TextBetWeenFirst(ItemList,'<h1 itemprop="name" class="">','<'); //Strings which opens/closes the data. WEB_SPECIFIC
AddFieldValueXML('title',titleValue);
LogMessage(' Get result title:'+titleValue+'||');
ItemValue:=TextBetWeenFirst(ItemList,'(',')'); //Strings which opens/closes the data. WEB_SPECIFIC
AddFieldValueXML('year',ItemValue);
LogMessage(' Get result year:'+ItemValue+'||');
ItemValue:=TextBetWeenFirst(ItemList,'<div class="originalTitle">','<'); //Strings which opens/closes the data. WEB_SPECIFIC
If (Length(ItemValue)=0) Then ItemValue:=titleValue; //Provider hides the original title if same that title. WEB_SPECIFIC
AddFieldValueXML('origtitle',ItemValue);
LogMessage(' Get result origtitle:'+ItemValue+'||');
ItemValue:=TextBetWeenFirst(ItemList,BASE_URL_IMAGE_PRE_TRUE,'.'); //Get poster code. Strings which opens/closes the data. WEB_SPECIFIC
if (Length(ItemValue)>0) then ItemValue:=BASE_URL_IMAGE_PRE + ItemValue + '._V1_UY1200_.jpg'; //WEB_SPECIFIC
if ItemValue <> '' then AddImageURL(itPoster,ItemValue)
else AddImageURL(itPoster,'http://ia.media-imdb.com/images/G/01/imdb/images/logos/imdb_fb_logo-1730868325._CB499606982_.png');
LogMessage(' Get result poster:'+ItemValue+'||');
End;
--- End quote ---
It works, but we'll see more tests if it's really the way it should be.
--- End quote ---
._V1_UY1200_.jpg it also works fine in this ._V1_UY2048_.jpg resolution.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version