English > Support
New changes on ImdB made PVD 1.0.2.7 Unusable
Ivek23:
--- Quote from: afrocuban on November 30, 2021, 01:27:44 am ---I hope you will help me 2 more questions.
in the script code, I found:
--- Quote ---If (Length(ItemValue)=0) Then ItemValue:=titleValue; //Provider hides the original title if same that title. WEB_SPECIFIC
--- End quote ---
Is there a way to unhide both origtitle and title when they're the same?
--- End quote ---
This is only visible if the title and original title are different.
In the custom Imdb_Title field, I edited it so that you have both the original and the local address, if the local address of course exists.
--- Quote --- //Get ~alternatetitle~
ItemValue:=TextBetWeenFirst(ItemList,'","alternateName":"','","'); //Strings which opens/closes the data. WEB_SPECIFIC
AddCustomFieldValueByName('Localized title',ItemValue);
if GET_LOCAL_TITLE then AddFieldValueXML('title',ItemValue);
if ItemValue <> '' then LogMessage(' Get result alternatetitle:'+ItemValue+'||');
If ItemValue <> '' then AddCustomFieldValueByName('Imdb_Title',ItemValue+#13+titleValue+' (original title)')
Else AddCustomFieldValueByName('Imdb_Title',titleValue);
//Get ~IMDB_Movietype~
--- End quote ---
--- Quote from: afrocuban on November 30, 2021, 01:27:44 am ---And maybe the biggest challenge for me. Is it possible to get/import English (International) title to a Title field while at the same time importing Localized Title too? Or to some other custom field for example?
--- End quote ---
In the custom English title field, you now have an English title. However, you have the manual option to possibly get / import English title to a Title field.
--- Quote ---Function ParsePage_IMDBMovieAKA(HTML:String):Cardinal; //BlockOpen
//Returns:
// Result:=prFinished; Script has finished gathering data
// Result:=prError; If żany big problem? with exit;
//Retrieve: ~aka~ "Also Known As"
Var
curPos,endPos,index:Integer;
ItemValue,ItemList:String;
ItemValue1:String;
ItemList2:String;
Name,Role,ItemValue2:String;
ItemArray: TWideArray;
Begin
LogMessage('Function ParsePage_IMDBMovieAKA BEGIN=====================||');
Result:=prFinished; //It will change to prError if any big problem with exit;
//Get ~aka~ (several values in a line break separated list) Be careful don't repeat
.
.
.
//Get all aka list ~Imdb Aka~
ItemValue1:=StringReplace(ItemValue1,'|','',True,True,False);
ItemValue1:=StringReplace(ItemValue1,' ',#13,True,True,False);
AddCustomFieldValueByName('Imdb Aka',ItemValue1);
//Get ~aka~ (English title)
curPos:=Pos('<table class="ipl-zebra-list akas-table-test-only">',ItemList2) //String which opens the subList data. WEB_SPECIFIC
While curPos>0 Do Begin
Name:=TextBetWeen(ItemList2,'<td class="aka-item__name">','</td>',false,curPos);
if Name <> '' then LogMessage(' Get result Name:'+Name+'||');
Role:=TextBetWeen(ItemList2,'<td class="aka-item__title">','</td>',false,curPos);
if Role <> '' then LogMessage(' Get result Role:'+Role+'||');
if ItemValue2 <> '' then ItemValue2:=ItemValue2+#13;
if Name <> '' then ItemValue2:=ItemValue2+Name;
if Role <> '' then ItemValue2:=ItemValue2+#160#160+Role;
if ItemValue2 <> '' then LogMessage(' Get results aka 2:'+ItemValue2+'||');
If Pos('(English title)',Name) > 1 then Role:=Role else Role:='';
if ItemValue2 <> '' then LogMessage(' Get results aka2:'+Role+'||');
AddCustomFieldValueByName('English title',Role);
//AddFieldValueXML('title',Role);
curPos:=PosFrom('<tr class="ipl-zebra-list__item aka-item">',ItemList2,curPos) //String which opens the subList data. WEB_SPECIFIC
End;
LogMessage('Function ParsePage_IMDBMovieAKA END=====================||');
End; //BlockClose
--- End quote ---
IMDB_[EN][HTTPS]_(afrocuban) script is attached.
Ivek23:
I fixed the Runtime code in the Function ParsePage_IMDBMovieBASE, where a change was made to the source code of the page.
New IMDB_[EN][HTTPS]_(afrocuban) script is attached.
afrocuban:
Thanks a lot Ivek. I am currently testing and customizing the script (max values mostly), but please confirm if I understood you well: it's not possible with the script to import English title to a standard Title field, it's only possible if I do it manually by copying/pasting it from AKA field to Title field?
I am asking, because I just don't know non-English movies by their original, or localized title. I know them only by their English title, and I would like to have in Tree view "%N. %T (%O)" where %T would be English title. That way I could recognize movie only by scrolling Tree view, but at the moment I have to click movie by movie to check which one that was, and that is way too slow.
For example, when I am not logged in on IMDb and I go to https://www.imdb.com/title/tt8228288/ with my country IP I see English title as main, and original title too. But, when I import it to PVD with the script, then somehow Title and original title are the same. Why can't I import it as it is in browser?
Best regards
Ivek23:
First try in Retrieve Data Config this GET ORIGINAL TITLE setting changes
--- Quote --- GET_ORIGINAL_TITLE = True ; //Download the alternate title info in your language in your country in of the principal movie page if it exists there for to replace the original title in the Title field.
// GET_ORIGINAL_TITLE = False ; //Download the alternate title info in your language in your country in of the principal movie page if it exists there for to replace the original title in the Title field.
--- End quote ---
like this
--- Quote ---// GET_ORIGINAL_TITLE = True ; //Download the alternate title info in your language in your country in of the principal movie page if it exists there for to replace the original title in the Title field.
GET_ORIGINAL_TITLE = False ; //Download the alternate title info in your language in your country in of the principal movie page if it exists there for to replace the original title in the Title field.
--- End quote ---
Or use the option described below.
Try in Function ParsePage_IMDBMovieAKA, where you have a custom English title field, you also have closed code for a normal Title field. Open this code for the normal Title field and check this field in the settings so that it overwrites you. It may work as you wish, otherwise part of the code will be arranged so that this field is overwritten.
afrocuban:
Dear ivek,
Thanks for the tips. As usual, they were invaluable.
After experimenting and in order to get in Tree view English title and Original title, as well as Localized title in a List view of my personal skin, I had to make these changes (and only this combination works for me).
Instead of:
--- Quote ---102 GET_ORIGINAL_TITLE = True ; //Download the alternate title info in your language in your country in of the principal movie page if it exists there for to replace the original title in the Title field.
103 // GET_ORIGINAL_TITLE = False ; //Download the alternate title info in your language in your country in of the principal movie page if it exists there for to replace the original title in the Title field.
--- End quote ---
it has to be:
--- Quote ---102 // GET_ORIGINAL_TITLE = True ; //Download the alternate title info in your language in your country in of the principal movie page if it exists there for to replace the original title in the Title field.
103 GET_ORIGINAL_TITLE = False ; //Download the alternate title info in your language in your country in of the principal movie page if it exists there for to replace the original title in the Title field.
--- End quote ---
Instead of:
--- Quote ---719 //AddCustomFieldValueByName('Localized title',titleValue);
--- End quote ---
it has to be:
--- Quote ---719 AddCustomFieldValueByName('Localized title',titleValue);
--- End quote ---
And, instead of:
--- Quote ---1386 AddCustomFieldValueByName('English title',Role);
1387 //AddFieldValueXML('title',Role);
--- End quote ---
it has to be:
--- Quote ---1386 // AddCustomFieldValueByName('English title',Role);
1387 AddFieldValueXML('title',Role);
--- End quote ---
Important note: I have included line numbers in order to easier find the code, those line numbers aren't part of the code. Hopefully this will be helpful to at least someone else.
Thank you so much for your patience and good will.
Best regards
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version