Author Topic: Automatically import Title, Original Titile, Local Title [WORKAROUND]  (Read 11827 times)

0 Members and 1 Guest are viewing this topic.

Offline afrocuban

  • Moderator
  • *****
  • Posts: 468
    • View Profile
1. Using IMDb plugin, I'm logging to IMDb via my IMDb account - the 1st picture attached.

2. My IMDb account is localized to my country - the 2nd picture attached.

3. What I'm trying to achieve is to automatically import three titles: Original Title imported to <origtitle>, Local Title imported to <title>, and English Title imported to <any specific PVD field / custom field>, but not <aka>, of course - final example would be as shown as in the 3rd picture attached.

Is it possible? Any idea how to achieve this goal?

Through "Feature suggestion", if it's not feasible at the moment?



[attachment deleted by admin]
« Last Edit: April 28, 2013, 01:32:56 am by afrocuban »

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Automatically import Title, Original Titile, Local Title
« Reply #1 on: April 20, 2013, 01:55:32 pm »
No it is not possible. The login does not work in the current version at all as they have changed the procedure and I did not find a way to support the new system. The plugin should currently get the localized title (default on imdb) and the original title if it is stated on the main page of the movie.
« Last Edit: April 20, 2013, 10:35:41 pm by nostra »
Gentlemen, you can’t fight in here! This is the War Room!

Offline afrocuban

  • Moderator
  • *****
  • Posts: 468
    • View Profile
Re: Automatically import Title, Original Titile, Local Title
« Reply #2 on: April 20, 2013, 03:55:24 pm »
Thanks for the answer. Sometimes some goals have so minor benefits that it looks so banal to achieve them... ;)

Offline afrocuban

  • Moderator
  • *****
  • Posts: 468
    • View Profile
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.
 8)

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
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.
 8)

afrocuban, nice and commendable, yes, this will be helpful to other users.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 468
    • View Profile
Thanks Ivek.

The best results, however, will be achieved when nostra finds a way for a PVD's imdb plugin to log in to a site.

Then, I'd recommend to set these site preferences for IMDb, when logged in:

"Title display country" - Local country
"Title display language" - English,

for which imdb seems to has corrected earlier bug


That way, instead of original title, the English title will always be shown on the imdb, and imported to a PVD "Title" field, when there's no local country's release title for the movie on imdb.com. The original title will be imported to a "origtitle" field, in any case, when there is one stated on the main page.

Nostra, please let us know when you find a way for imdb plugin to log in.
« Last Edit: April 28, 2013, 03:59:18 pm by afrocuban »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 468
    • View Profile
Re: Automatically import Title, Original Titile, Local Title [WORKAROUND]
« Reply #7 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.