Posted by: afrocuban
« on: October 17, 2015, 10:35:02 am »This is to relate to an update to this forum topic, starting this message, if someone is interested in with it.
I found a way to get this:
1. Import local title and original title from imdb.com
2. Define custom field in PVD, for instance "English Title"
3. Set Ivek's AllMovie.com_new script in PVD->Preferences->Plugins, not to overwrite "Title"
4. Modify Ivek's AllMovie.com_new script like this, for example, in order to import Title (which is always English title) to a custom field "English Title":Code: [Select]//~mfTitle~ or ~Title~
curPos := Pos('<title>', HTML) + Length('<title>');
//if Pos('- Trailers, Reviews, Synopsis, Showtimes and Cast - AllMovie</title>', HTML) > 0 then
// endPos := PosFrom('- Trailers, Reviews, Synopsis, Showtimes and Cast - AllMovie</title>', HTML, curPos)
//else
// endPos := PosFrom('- Cast and Crew - AllMovie</title>', HTML, curPos);
if Pos('(', HTML) > 0 then
endPos := PosFrom('(', HTML, curPos);
TmpStr1 := Copy(HTML, curPos, endPos - curPos);
AddFieldValue(mfTitle, TmpStr1);
AddCustomFieldValueByName('English Title', TmpStr1);
5. Import data with modified Ivek's AllMovie.com_new script
Voila!
6. Make a batch file IMDB+AllMovie to automate the process
7. If you don't want to import anythiing else except English Title from Allmovie.com, then set up Ivek's AllMovie.com_new script in Preferences, and modify it to import only English Title
Hope this helps.
//~mfTitle~ or ~Title~
curPos := Pos('<title>', HTML) + Length('<title>');
//if Pos('- Trailers, Reviews, Synopsis, Showtimes and Cast - AllMovie</title>', HTML) > 0 then
// endPos := PosFrom('- Trailers, Reviews, Synopsis, Showtimes and Cast - AllMovie</title>', HTML, curPos)
//else
// endPos := PosFrom('- Cast and Crew - AllMovie</title>', HTML, curPos);
if Pos('(', HTML) > 0 then
endPos := PosFrom('(', HTML, curPos);
TmpStr1 := Copy(HTML, curPos, endPos - curPos);
AddFieldValue(mfTitle, TmpStr1);
AddCustomFieldValueByName('English Title', TmpStr1);