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

Running FileBot from the console, Groovy / FileBot 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 » 29 Dec 2012, 01:10

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: 16585
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah » 29 Dec 2012, 01:37

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 » 29 Dec 2012, 02:05

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: 16585
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah » 29 Dec 2012, 03:01

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: 16585
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah » 29 Dec 2012, 03:02

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 » 29 Dec 2012, 03:11

So obvious :o

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

Post Reply