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"))
Feature Request: support for Language in alternativeTitles
Re: Feature Request: support for Language in alternativeTitl
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)
EDIT: Added WebServices.TheMovieDB.getAlternativeTitles(id)
Re: Feature Request: support for Language in alternativeTitl
thx, I will get back to you... if there is a problem with it
(no update on Jar yet)
(no update on Jar yet)
Re: Feature Request: support for Language in alternativeTitl
Looks like it only show the 1st entry of a county, can you confirm ?
{net.filebot.WebServices.TheMovieDB.getAlternativeTitles(16320)}
{net.filebot.WebServices.TheMovieDB.getAlternativeTitles(16320)}
Re: Feature Request: support for Language in alternativeTitl
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.
Re: Feature Request: support for Language in alternativeTitl
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
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
Re: Feature Request: support for Language in alternativeTitl
ok, latest commit makes this a map of lists so you can have multiple titles per country code.
Re: Feature Request: support for Language in alternativeTitl
thx
maybe someone can use this:
result:
[alt name 1 (AU), alt name 2 (US), alt name 3 (US)]
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() }
[alt name 1 (AU), alt name 2 (US), alt name 3 (US)]
Re: Feature Request: support for Language in alternativeTitl
to use in the htpc (under def fetchMovieNfo):
[/code]
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: Select all
def xml = XML {
movie {
CustomAltLIST.each{
alternativetitles(it)
}