TV AliasNames

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

TV AliasNames

Post by kim »

Tested in GUI with id 77623 aka Cheers

Why do this work:

Code: Select all

{info.AliasNames} or {alias}
... when this don't ?

Code: Select all

{net.filebot.WebServices.TheTVDB.getSeriesInfo(77623, Locale.ENGLISH).getAliasNames()}
Update:
more test with id 281662 aka Daredevil
looks like this works:

Code: Select all

{net.filebot.WebServices.TheTVDB.getSeriesInfo(281662, Locale.ENGLISH).getAliasNames()}
so {info.AliasNames} or {alias} is more like alternative titles and should be renamed or something ?

Edit:
to be clear this is OK (same as in the htpc/nfo):

Code: Select all

{net.filebot.WebServices.TheTVDB.getSeriesInfo(281662, Locale.ENGLISH).getAliasNames()}
now it only gets alias of same language as requested (default EN) ?
If you combine the {alias} with this one and we can get the language codes with it,
then pls include it ?
(so I can filter out the part I don't want e.g. Russian)

It looks like {alias} include all primary titles of available languages + "Marvel's Daredevil (2015)"
I don't get where filebot gets e.g. "Marvel's Daredevil (2015)" from ?
(It's not in any language AFAIK)
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: TV AliasNames

Post by rednoah »

{alias} is just a list of alternative names the show is known by. It's primarily used by FileBot internally to identify files, and may contain abbreviations or incorrectly spelled versions of the title, so it's probably not very useful for format expressions.

If you want the official title for another language, then you can use the {localize} binding:

Code: Select all

{n} - {localize.Korean.n}
There is no efficient way to get only the primary title for all languages. If you just want to filter out Russian from the {alias} list, then you could just filter out items that contain Cyrillic characters.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: TV AliasNames

Post by kim »

I wanted to get aliases in the nfo file, but "i.aliasNames" is
equal to

Code: Select all

{net.filebot.WebServices.TheTVDB.getSeriesInfo(77623, Locale.ENGLISH).getAliasNames()}
and not

Code: Select all

{info.AliasNames} or {alias}
It would be nice if I could list e.g. the Danish title, if any without the need to do e.g.

Code: Select all

TheTVDB.getSeriesInfo(seriesId, new Locale('da'))
just for that, even if there is no Danish title.

Something like this:

Code: Select all

// Get [filtered] Alternative Titles, only if any found
	def CustomAltLIST = ''
	if (i.alternativeTitles[0] != null){
		def altCountryLIST = ['AU', 'CA', 'DK', 'GB', 'NO', 'SE', 'US']
		log.fine "FROM htpc fetchMovieNfo - Downloading Alternative Titles for these languages: $altCountryLIST"
		CustomAltLIST = TheMovieDB.getAlternativeTitles(i.id).findAll{key, value -> altCountryLIST.any{key.contains(it)}}.sort().findResults{key, value -> value.findResults{"$it ($key)"} }.flatten()
	}
this is from my "fetchMovieNfo" part
Post Reply