English > Support
Personal Video Database 1.0.2.7 MOD
VVV_Easy_Programing:
I'm agree with you that the script doesn't give you any problems.
I want to say that perhaps this is because the script don't use the stored URL and it search the title in IMDB and continues scrapping.
You may see the script behaviour with the log window tool.
afrocuban:
Thank you so much for your help guys! I will try cumulative script patch after finish updating.
Regardless of Ivek's and mine issue regarding "www", it is obviously solvable, one way or another. Still, the original, first issue is mystery and I connected it with the issue that I cannot overwrite some fields (mostly "Title", but some other as well), manually or automatically. Do you have any idea why some field could not be editied, manually, or automatically???
Thanks in advance!
afrocuban:
I have found the cause of the error from this message:
http://www.videodb.info/forum_en/index.php/topic,4134.msg20748.html#msg20748
... and the workaround for it.
The problem is IMDb url that is stored in the "URL" field! Although it is perfectly valid (I copy it from the URL field then paste it in browser and it goes to the proper movie), it will not work if you try to update movie in PVD, or to manually edit any other field imported by IMDb script or plugin!
So, I went to Grid View, and for some movies I tried to delete Title and Origititle and, bam - I got the same error message as the one while importing with script.
Finally, in Grid view I deleted stored IDMb url (which is perfectly valid), and then let the script imports data and, another BAM - everything worked great!
Meaning, when I delete stored IMDb url (it is sometimes possible in Tree View, but it is always possible in Grid View), I am able to edit any other field, hence to update movie!
Why is this happening and why to only certain movies/records it's the mystery probably no one will solve.
If someone can explain this I'd be more than grateful. Luckily, I had only 105 movies of 7000 movies with this issue, so I will manually edit each one url and update it, but that will not resolve possible future issues. Workaround is not a solution, that is why it is called only - workaround.
Best regards
VVV_Easy_Programing:
Good news even if it must expend "some" manual editing time! It's true that the Grid View edition is a little bit forgotten.
Perhaps you have some especial chars in the URL's fields that the browser is capable to manage and PVD crash (for instance, the URL's must be separated by spaces not by Return, char#13).
--- Quote ---Regardless of Ivek's and mine issue regarding "www", it is obviously solvable, one way or another.
--- End quote ---
I strongly recommend you use the standar url formats because there is other script (TheMovieDB) that use the IMDB link and is the normal way of PVD to detect the provider url (remember when PVD directly download the page when it detects the BASE_URL in the URL field, this is the reason that in the HTTPS scripts the function GetBaseURL returns BASE_URL_ROUNDABOUT in order to cheat GET PVdB funtion and rondabout the "https" fail).
And if all records are with those formats are easy to change with a SQL script because the URL field is a little bit especial, for instance, I haven't found the manner to protect it from script write or to delete all with the mass editor.
Ivek23:
IMDB_ [EN] [HTTPS] script
A beauty correction for a piece of code for Date ~ Updated ~ (choose simple or verbose version) .
--- Quote --- //Date ~Updated~ (choose simple or verbose version)
Date:=DateToStr(CurrentDateTime);
//AddFieldValueXML('viewdate',Date); //Only date, don't admit time-. Set Seen value at the same time.
//AddFieldValueXML('moddate',Date+' '+TimeToStr(CurrentDateTime)); //Block the dB saving
ExplodeString(Date,DateParts,'-');
Date:=DateParts[2]+'.'+ DateParts[1]+'.'+DateParts[0];
Date:=StringReplace(Date,'01.','1.',True,True,False);
Date:=StringReplace(Date,'02.','2.',True,True,False);
Date:=StringReplace(Date,'03.','3.',True,True,False);
Date:=StringReplace(Date,'04.','4.',True,True,False);
Date:=StringReplace(Date,'05.','5.',True,True,False);
Date:=StringReplace(Date,'06.','6.',True,True,False);
Date:=StringReplace(Date,'07.','7.',True,True,False);
Date:=StringReplace(Date,'08.','8.',True,True,False);
Date:=StringReplace(Date,'09.','9.',True,True,False);
//AddCustomFieldValueByName('Updated',Date); // Simple
//AddCustomFieldValueByName('Updated',Date+' at '+TimeToStr(CurrentDateTime)); // Verbose
AddCustomFieldValueByName('Updated',Date+' at '+TimeToStr(CurrentDateTime)+' • '+SCRIPT_NAME+' '+SCRIPT_VERSION); // Annoying
--- End quote ---
For Function ParsePage_IMDBMovieMPAA is also a small correction again.
--- Quote ---Function ParsePage_IMDBMovieMPAA(HTML:String):Cardinal; //BlockOpen
//Returns:
// Result:=prFinished; Script has finished gathering data
// Result:=prError; If any big problem? with exit
//Retrieve: ~MPAA~
Var
curPos:Integer;
mpaaValue:String;
Begin
.
.
.
mpaaValue:=StringReplace(mpaaValue,'Suggested Rating','. Suggested Rating',False,False,False); //Avoid union in films with 'Suggested Rating'
mpaaValue:=StringReplace(mpaaValue,'update: ','',False,False,True); //Cleanig value. //WEB_SPECIFIC
mpaaValue:=StringReplace(mpaaValue,': ','',False,False,True); //Cleanig value. //WEB_SPECIFIC
curPos:=Pos('Edit',mpaaValue); //WEB_SPECIFIC.
If 0<curPos then mpaaValue:=Copy(mpaaValue,0,curPos-1);
If (mpaaValue='Approved') Then mpaaValue:='Rated G';
.
.
.
AddFieldValueXML('mpaa',mpaaValue);
LogMessage(' Get result MPAA='+mpaaValue+'||');
LogMessage('Function ParsePage_IMDBMovieMPAA END=====================||');
End; //BlockClose
--- End quote ---
Full Cast and Crew section
For directors is also a small correction again.
--- Quote --- //Go to "Directed by" ~crew~ctDirectors
curPos:=Pos('<h4 class="dataHeaderWithBorder">Directed by',HTML); //Strings start which opens the block content data. WEB_SPECIFIC
If 0<curPos Then Begin
curPos:=PosFrom('</h4>',HTML,curPos); //Strings end which opens the block content data. WEB_SPECIFIC
curPos:=curPos+Length('</h4>'); //Strings end which opens the block content data. WEB_SPECIFIC
//Get all "raw" crew summary (in raw because we need the hidden person links) May one person or severals in the ~crew~ n the ~crew~
endPos:=PosFrom('</table>',HTML,curPos); //Strings which opens/closes the data. WEB_SPECIFIC
ItemList:=Copy(HTML,curPos,endPos-curPos);
//LogMessage(' Parse results ('+IntToStr(curPos)+','+IntToStr(endPos)+') complex ItemList:'+ItemList+'||');
curPos:=Pos('<td class="name">',ItemList) //String which opens the subList data. WEB_SPECIFIC
index:=1;
While curPos>0 Do Begin
If (index>PEOPLE_LIMIT) Then break; //Limited depassed (Remember index begin in 0).
//Get PersonURL (Always must it has)
PersonURL:=BASE_URL_PERSON_PRE + TextBetWeen(ItemList,'<a href="/name/','/',false,curPos) + BASE_URL_SUF; //Strings which opens/closes the data. WEB_SPECIFIC
LogMessage(' Parse Results PersonURL:'+PersonURL+'||');
//Get Name (Always must it has)
Name:=TextBetWeen(ItemList,'> ','</a>',false,curPos); //Strings which opens/closes the data. WEB_SPECIFIC
LogMessage(' Parse Results Name:'+Name+'||');
//Get Role: PVD don't save Role in crew people but is added for Ivek23 as LogMessage compatibility
//Role:=TextBetWeen(ItemList,'<td class="credit">','</td>',false,curPos); //Strings which opens/closes the data. WEB_SPECIFIC
Role:=TextBetWeen(ItemList,'<td ','</td>',false,curPos); //Strings which opens/closes the data. WEB_SPECIFIC
LogMessage(' Parse Results Role:'+Role+'||');
AddMoviePerson(Name,'','',PersonURL,ctDirectors);
LogMessage(' Get results Director:#'+IntToStr(index)+'|'+Name+'|'+PersonURL+'||ctDirectors');
curPos:=PosFrom('<td class="name">',ItemList,curPos) //String which opens the subList data. WEB_SPECIFIC
index:=index+1;
End;
End;
--- End quote ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version