To have .fre.srt instead of .fra.srt for French subtitles

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
polux400
Posts: 10
Joined: 09 Sep 2012, 01:06

To have .fre.srt instead of .fra.srt for French subtitles

Post by polux400 »

Hello,

I'm using Plex as media center and it seems to be based on ISO 639-2/B http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes to determine which is the language of the subtitles files.

Apparently, Filebot is based on another ISO number, results that for french subtitles downloaded by filebot I have *.fra.srt and Plex is waiting for *.fre.srt

is it possible to add a script line or arg to my script to change ".fra" to ".fre" when Filebot script download and rename the subtitles file ?

I'm using this simple (but so powerful!!) script :

Code: Select all

filebot -script fn:suball "F:\Series" --lang fr -non-strict
My media center is not far from perfect thanks to Plex and Filebot ;-)

Thank you

polux
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: To have .fre.srt instead of .fra.srt for French subtitle

Post by rednoah »

Nope. Java locale APIs work with the ISO 639-2/T standard. I'd be very unclean to build in special cases & hacks.

But you can just have filebot or other renamers replace .fre with .fra => http://filebot.sourceforge.net/forums/v ... &t=5#p2100
:idea: Please read the FAQ and How to Request Help.
polux400
Posts: 10
Joined: 09 Sep 2012, 01:06

Re: To have .fre.srt instead of .fra.srt for French subtitle

Post by polux400 »

Thanks for the quick answer.

Of course I didn't ask to modify Filebot for me, just to know how can i modify my Filebot script to resolve this.

in order to do that, can I use this line ?

Code: Select all

filebot -script fn:replace --def "e=.fra.srt" "r=.fre.srt"
doesn't seems to work

or do i need the groovy script linked ?
http://filebot.sf.net/scripts/replace.groovy

in both case, i don't really understand how to customize it to my problem, a little help ? :)

thanks !
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: To have .fre.srt instead of .fra.srt for French subtitle

Post by rednoah »

Your cmdline looks good. Is there any output? Not a lot of people using that script. Maybe still has some issues.
: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: To have .fre.srt instead of .fra.srt for French subtitle

Post by rednoah »

Cmdline is good but you're missing arguments. Just add a folder/file argument where you wanna apply that script.
:idea: Please read the FAQ and How to Request Help.
polux400
Posts: 10
Joined: 09 Sep 2012, 01:06

Re: To have .fre.srt instead of .fra.srt for French subtitle

Post by polux400 »

So obvious :o

It works now with the folder arg, thanks again for the help !
Post Reply