info.AlternativeTitles

All your suggestions, requests and ideas for future development
Post Reply
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

info.AlternativeTitles

Post by kim »

is there a way to get the "info.AlternativeTitles" tag to get a Language sub-tag ?
so if i want to use a specific language title i can i.e."info.AlternativeTitles.DK" or "info.AlternativeTitles.DE"
thx
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: info.AlternativeTitles

Post by rednoah »

No. Not supported. Not sure if that information is even available in the first place...
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: info.AlternativeTitles

Post by kim »

it is i.e.
"alternative_titles":{"titles":[{"iso_3166_1":"US","title":"The Olsen Gang Sees Red"},{"iso_3166_1":"DK","title":"Olsen Banden ser rødt"}


any "Unofficially" way of doing it ?

you did something like it here
viewtopic.php?f=8&t=2673&p=15126&hilit= ... fad#p15126
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: info.AlternativeTitles

Post by rednoah »

I see. The API does seem to make the data available. To make something like info.certifications.US possible requires code changes.

The "unofficial" way to do it would be to talk to TheTVDB API yourself via Groovy. That would be tricky for non-programers though.

What's the use case here anyway? If you want DK or DE titles you can always set your language preferences, and if you want English / Original titles in addition to your preferred language then there's bindings already.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: info.AlternativeTitles

Post by kim »

what i really want to do is this:
if : filename contains 'DK' (Animation with Danish soundtrack) OR movie has Danish in 'info.spokenLanguages' then get the Danish 'title','sorttitle','set', 'plot (aka overview)' BUT all other info from English (default) i.e. genre, trailer... and if i.e. 'plot (aka overview)' = null then take info from English (default)

else : just use English (default) for all, maybe Danish in 'plot' if not null


so how to do this?
use Danish as scraping default?
maybe i can use a CSV file for the genre, to convert to English?
but how to get English (default) info on 95% of the movies (the Non-Danish soundtrack or spokenLanguages) i.e. title, plot ... etc

i was thinking of making a batch file for the 'filename contains 'DK'' part with "--lang da" if yes... else without 'lang' but then i will need to rename ( add DK) all other Danish files for it to work?

i have parts of the code i can use here:

Code: Select all

{(((info.spokenLanguages[0]==~/da/)|(info.spokenLanguages[1]==~/da/))?(info.originalName):(info.Name))}
{def dkinfo = net.filebot.WebServices.TheMovieDB.getMovieInfo(movie, new Locale('da'), true); dkinfo.name}
{def dkinfo = net.filebot.WebServices.TheMovieDB.getMovieInfo(movie, new Locale('da'), true); dkinfo.overview}
{net.filebot.WebServices.TheMovieDB.getMovieDescriptor(movie, Locale.ENGLISH)}
{def DANISH=/.dk/.toUpperCase();def dkinfo = net.filebot.WebServices.TheMovieDB.getMovieInfo(movie, new Locale('da'), true);def Soundtrack=info.spokenLanguages;(fn.toLowerCase().contains(DANISH.toLowerCase())) ? (((Soundtrack[0]==~/da/)||(Soundtrack[1]==~/da/)) ? 'DANISH Soundtrack ' + dkinfo.name + DANISH : 'NO DANISH Soundtrack ' + dkinfo.name + DANISH) : (((Soundtrack[0]==~/da/)||(Soundtrack[1]==~/da/)) ? 'DANISH Soundtrack ' + dkinfo.name : 'NO DANISH Soundtrack ' + info.Name)}
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: info.AlternativeTitles

Post by rednoah »

Yes, if you want most of the info in English, but some hand-picked piece of information in Danish then --lang EN nor --lang DK won't help much.

Right now, some unofficial solution should work reasonably well:

Code: Select all

{net.filebot.WebServices.TheMovieDB.getMovieDescriptor(movie, new Locale('da')).name}
Though you still need to figure out your own condition when to use the Danish name. Checking the original file path or some mediainfo should work well depending on your files.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: info.AlternativeTitles

Post by rednoah »

The new {localize} binding makes things more elegant:
viewtopic.php?f=5&t=3321&p=18449#p18449
:idea: Please read the FAQ and How to Request Help.
Post Reply