AMC and renaming subtitle language

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
acathla
Posts: 1
Joined: 13 Jun 2014, 22:29

AMC and renaming subtitle language

Post by acathla »

I'm sure this must be fairly simple but I just can't get it to work with AMC.

I've got this script up and running correctly:

Code: Select all

chp filebot -script fn:amc --log-file amc.log --action move --conflict override -non-strict --def plex=localhost --def "seriesFormat=F:/PathToShows/{n}/SEASON {s}/{fn}" "movieFormat=G:/PathToMovies/{genres[0]}/{y} - {n}/{n} ({y})" clean=y music=y subtitles=pob artwork=n gmail=email:senha mailto=email "ut_label=%L" "ut_state=%S" ut_state_allow=11 "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
Thing is, I need to download *.pob subtitles, but Plex Media Center uses a different standard and needs them to be *.por in order to index them correctly. So what I'm trying to do is rename them on the fly once they are downloaded but before they are moved to my library. A "battlestar.galactica.s04e01.hdtv-lol.pob.srt" file, for example, would be renamed to a "battlestar.galactica.s04e01.hdtv-lol.por.srt" and then moved.

I've tried a lot of things but I think the closest I could get to the real deal would be something like this

Code: Select all

chp filebot -script fn:amc --log-file amc.log --action move --conflict override -non-strict --def plex=localhost --def "seriesFormat=F:/PathToShows/{n}/SEASON {s}/{fn}" "movieFormat=G:/PathToMovies/{genres[0]}/{y} - {n}/{n} ({y})" clean=y music=y subtitles=pob artwork=n gmail=email:senha mailto=email "ut_label=%L" "ut_state=%S" ut_state_allow=11 "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" fn:replace --def "e=.pob.srt" "r=.por.srt" fn:suball
But then my script fails completely.

Would anyone shed some light on this?

Thanks.
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC and renaming subtitle language

Post by rednoah »

1.
You can't call multiple scripts with one filebot call. You need 3 filebot -script fn:name calls for the 3 scripts you wanna call.

1a.
Why use fn:suball when amc already includes subtitle downloading?

1b.
Why use fn:replace if you can do {lang} or {lang.replace('pob', 'por')} in your format?
:idea: Please read the FAQ and How to Request Help.
Post Reply