IMDb Translated Title Regional Title Issue
-
- Posts: 10
- Joined: 2008-02-01 02:17:43
IMDb Translated Title Regional Title Issue
Hello,
I edited IMDb script so it'll use Spanish title for translated title instead of English alternative title.
It works fine except when there's also a title in Catalan (that's a regional language in northeastern Spain).
Since it appears first in IMDb alternative page, that's the one the script uses.
Is there a workaround for this?
I can't find a way.
Thanks a lot for this amazing software and for your time.
I edited IMDb script so it'll use Spanish title for translated title instead of English alternative title.
It works fine except when there's also a title in Catalan (that's a regional language in northeastern Spain).
Since it appears first in IMDb alternative page, that's the one the script uses.
Is there a workaround for this?
I can't find a way.
Thanks a lot for this amazing software and for your time.
-
- Posts: 10
- Joined: 2008-02-01 02:17:43
Re: IMDb Translated Title Regional Title Issue
Unfortunately, on the latest 4.2.2-beta this is still happening.
EDIT:
This is an example of how it shows on IMDb:
Spain Ciudadano Kane
Spain (Catalan title) Ciutadà Kane
If I set the UserCountry in script parameters as Spain, whenever there's a Catalan title, that's the one AMC gets from the IMDb script.
EDIT:
This is an example of how it shows on IMDb:
Spain Ciudadano Kane
Spain (Catalan title) Ciutadà Kane
If I set the UserCountry in script parameters as Spain, whenever there's a Catalan title, that's the one AMC gets from the IMDb script.
Re: IMDb Translated Title Regional Title Issue
It is strange because how the script is made it should stop at the first result found And I get the Spanish title first.
Maybe in your case IMDb sends the Catalan title first?
If so, a workaround could be to take in account the titles that match exactly the country (so no match if there is an extra detail between parenthesis):
replace
by
Maybe in your case IMDb sends the Catalan title first?
If so, a workaround could be to take in account the titles that match exactly the country (so no match if there is an extra detail between parenthesis):
replace
Code: Select all
if pos(AKACountry(), value) > 0 then
Code: Select all
if AKACountry() = value then
-
- Posts: 10
- Joined: 2008-02-01 02:17:43
Re: IMDb Translated Title Regional Title Issue
Thank you for your quick answer!
I'll look into that.
I'll look into that.
Re: IMDb Translated Title Regional Title Issue
Hi, im not creating a new topic because its a similar problem so;
Im using amc 4.2.2.1 and the last imdb script 4.013 and i cant get the Title Translated with the script, it gets all the rest fine, the UserCountry is config to my language(portugal) but even if i change to other language, it still dont get any title translated -.-
Im using amc 4.2.2.1 and the last imdb script 4.013 and i cant get the Title Translated with the script, it gets all the rest fine, the UserCountry is config to my language(portugal) but even if i change to other language, it still dont get any title translated -.-
Re: IMDb Translated Title Regional Title Issue
There is indeed something about titles on my to-do list since more than a month, I assume it is the same problem.
I should take some time for it ... some day
I should take some time for it ... some day
Re: IMDb Translated Title Regional Title Issue
Happy new year!
Any news about the Title Translated fix?
Any news about the Title Translated fix?
Re: IMDb Translated Title Regional Title Issue
Happy New Year
Not checked yet, sorry
Not checked yet, sorry
Re: IMDb Translated Title Regional Title Issue
Thanks to user athe , the fix is:
edit the script in atm program, replace the lines 478 to 512 with;
Tested and working!
edit the script in atm program, replace the lines 478 to 512 with;
Code: Select all
// AKA Name
if CanSetField(fieldTranslatedTitle) then
begin
FullValue := ConvertToASCII(GetPage(MovieURL+'/releaseinfo#akas'));
FullValue := TextBetween(FullValue, 'id="akas"', '</table>');
while Fullvalue <> '' do
begin
Value2 := TextBetween(FullValue, ' <td class="aka-item__name">', '</td>'); //country
Value := TextBetween(FullValue, '<td class="aka-item__title">', '</td>'); //title
HTMLDecode(Value2);
if (GetParam('UserCountry') = Value2) then
begin
HTMLDecode(Value);
SetField(fieldTranslatedTitle, FullTrim(Value));
FullValue := '';
end
else FullValue := TextAfter(FullValue, '</tr>');
end;
Tested and working!
Re: IMDb Translated Title Regional Title Issue
Thanks, I updated it on the server
Re: IMDb Translated Title Regional Title Issue
this line has to be changedtoonly for users from the USA and UK
Code: Select all
if (GetParam('UserCountry') = Value2) then
Code: Select all
if AKACountry() = Value2 then
Code: Select all
// AKA Name
if CanSetField(fieldTranslatedTitle) then
begin
FullValue := ConvertToASCII(GetPage(MovieURL+'/releaseinfo#akas'));
FullValue := TextBetween(FullValue, 'id="akas"', '</table>');
while Fullvalue <> '' do
begin
Value2 := TextBetween(FullValue, ' <td class="aka-item__name">', '</td>'); //country
Value := TextBetween(FullValue, '<td class="aka-item__title">', '</td>'); //title
HTMLDecode(Value2);
if AKACountry() = Value2 then //this line must be for users from the USA and UK
begin
HTMLDecode(Value);
SetField(fieldTranslatedTitle, FullTrim(Value));
FullValue := '';
end
else FullValue := TextAfter(FullValue, '</tr>');
end;
end;
// Comments
Re: IMDb Translated Title Regional Title Issue
Thanks
(well it should work for all users, but indeed useful only for UK/US)
(well it should work for all users, but indeed useful only for UK/US)
Re: IMDb Translated Title Regional Title Issue
New version 4.016, asking to select the translated title if multiple are found.
Titles identical to original one are ignored.
First one is taken by default is BatchMode is enabled.
Titles identical to original one are ignored.
First one is taken by default is BatchMode is enabled.