Page 1 of 1

[Feature Request] Search titles for other languages

Posted: 04 Jan 2014, 18:42
by Ambroisie
Hi, here's what I would love to have, there are some shows I share on shared folders with my cousin, he's german and wants the titles in german, whereas I want the titles in english and french, I figured :

Why can't Filebot do the three in one ? Kind of : English Title (French One - German One)....

I think you should integrate some sort of "t.en" for the english language, "t.fr" for the french... et coetera.

What do you think ?

Re: [Feature Request] Search titles for other languages

Posted: 04 Jan 2014, 19:14
by rednoah
Only very few people would ever be looking for multiple languages, not to mention that you should name things in English or original language anyway at all times.

There won't be bindings because the data won't be available in advance.

There's hacks like this though:

Code: Select all

{def db = net.sourceforge.filebot.WebServices.TheTVDB; ['en', 'fr', 'de'].collectMany{ lc -> db.getEpisodeList(series, null, new Locale(lc))}.findAll{episode.season == it.season && episode.episode == it.episode}.title.join(' - ')}

Re: [Feature Request] Search titles for other languages

Posted: 04 Jan 2014, 19:28
by Ambroisie
Could you explain a bit more please ? What does it output ?

Re: [Feature Request] Search titles for other languages

Posted: 04 Jan 2014, 19:32
by bonelifer
Instead of having all three in the file name, why not name the file in English and take the results for German and French and symlink.

//STORAGE/Videos/English/English Title.mkv (Real File

symlinked files:
//STORAGE/Videos/Deutsch/Deutsch Titel.mkv
//STORAGE/Videos/Francais/Titre francais.mkv

Re: [Feature Request] Search titles for other languages

Posted: 04 Jan 2014, 19:35
by rednoah
Very good point. You should do what bonelifer is says. Create 3 different folder structure for the 3 languages. With the HARDLINK option you can have the same file on different folders without taking more space. And you if you want things more automated then you can just put 3 filebot -rename calls into a shell script.

EDIT:
This is what the previous expressions does:
http://snag.gy/Xpmez.jpg

It's a matter of copy and paste. You could have tried this yourself. ;)


EDIT2:
This is for future reverence and only works with r1972+

Code: Select all

{['en', 'fr', 'de'].collectMany{ lc -> database.getEpisodeList(series, 'airdate', lc)}.findAll{episode.numbers == it.numbers}.title.join(' - ')}

Re: [Feature Request] Search titles for other languages

Posted: 04 Jan 2014, 21:38
by Ambroisie
Ok thanks, but just to know, is there a way to make it write the two last ones in brackets ?

I think I'll do like bonelifer said, three folders structure, thanks all !

Re: [Feature Request] Search titles for other languages

Posted: 05 Jan 2014, 05:37
by rednoah
I show you how you get the data. How to format it in different ways is easy to figure out. Check your nearest Groovy tutorial. ;)

Re: [Feature Request] Search titles for other languages

Posted: 05 Jan 2014, 10:59
by Ambroisie
Ok, I don't think it's gonna be easy, but I'll try...

Re: [Feature Request] Search titles for other languages

Posted: 05 Jan 2014, 11:28
by rednoah
Compared to the above, how is this more complicated? It's almost exactly the same, just composed differently. :D

Code: Select all

{t} ({['fr', 'de'].collectMany{ lc -> database.getEpisodeList(series, 'airdate', lc)}.findAll{episode.numbers == it.numbers}.title.join(', ')})
Remember that this one requires r1972+

Re: [Feature Request] Search titles for other languages

Posted: 05 Jan 2014, 19:10
by Ambroisie
I didn't think about this like that... Thanks :P