Feature Request: support for Language in alternativeTitles

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

Feature Request: support for Language in alternativeTitles

Post by kim »

pls add support for Language in alternativeTitles so I can filter out (for me) USELESS info

e.g.:
"alternative_titles":{"titles":[{"iso_3166_1":"US","title":"alt. US title"},{"iso_3166_1":"IT","title":"Some Italian title I can't use"}}

now: {info.alternativeTitles}

Request: {info.alternativeTitles.lang}
e.g. {info.alternativeTitles.US}

and in htpc XML:
i.alternativeTitles.US.each{alternativetitles(it)}

add "iso_3166_1" to somewhere in this, I guess:
streamJsonObjects(getMap(response, "alternative_titles"), "titles").map(it -> getString(it, "title"))
User avatar
rednoah
The Source
Posts: 23932
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Feature Request: support for Language in alternativeTitl

Post by rednoah »

Sorry, I'm somewhat reluctant to change internal data models. I could add an extra method in TMDb to make it slightly to directly access that stuff via the format though.

EDIT: Added WebServices.TheMovieDB.getAlternativeTitles(id)
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Feature Request: support for Language in alternativeTitl

Post by kim »

thx, I will get back to you... if there is a problem with it
(no update on Jar yet)
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Feature Request: support for Language in alternativeTitl

Post by kim »

Looks like it only show the 1st entry of a county, can you confirm ?
{net.filebot.WebServices.TheMovieDB.getAlternativeTitles(16320)}
User avatar
rednoah
The Source
Posts: 23932
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Feature Request: support for Language in alternativeTitl

Post by rednoah »

Yep, it'll give you a map with country code as key. There can only be one mapping per key. I don't know what happens if a key occurs multiple times. It'll take either the first or the last one.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Feature Request: support for Language in alternativeTitl

Post by kim »

sorry to hear this, because a lot if not most movies have more then 1 per. language.

are you sure you can't make it show all (if in array and not a map is ok with me) ?

if not or maybe add land code to the title,
because now we can't see what language a title is in the {info.alternativeTitles}
e.g.
"iso_3166_1":"US","title":"alt. US title" -> alt. US title (US)
that way we can filter what we want or don't want
User avatar
rednoah
The Source
Posts: 23932
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Feature Request: support for Language in alternativeTitl

Post by rednoah »

ok, latest commit makes this a map of lists so you can have multiple titles per country code.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Feature Request: support for Language in alternativeTitl

Post by kim »

thx

maybe someone can use this:

Code: Select all

{def altCountryLIST = ['AU', 'CA', 'DK', 'GB', 'NO', 'SE', 'US']; net.filebot.WebServices.TheMovieDB.getAlternativeTitles(id).findAll{key, value -> altCountryLIST.any{key.contains(it)}}.sort().findResults{key, value -> value.findResults{"$it ($key)"} }.flatten() }
result:
[alt name 1 (AU), alt name 2 (US), alt name 3 (US)]
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Feature Request: support for Language in alternativeTitl

Post by kim »

to use in the htpc (under def fetchMovieNfo):

Code: Select all

[code]def altCountryLIST = ['AU', 'CA', 'DK', 'GB', 'NO', 'SE', 'US']
def CustomAltLIST = TheMovieDB.getAlternativeTitles(i.id).findAll{key, value -> altCountryLIST.any{key.contains(it)}}.sort().findResults{key, value -> value.findResults{"$it ($key)"} }.flatten()
[/code]

Code: Select all

	def xml = XML {
		movie {
			CustomAltLIST.each{
				alternativetitles(it)
			}
Post Reply