Page 1 of 1

Modify AMC to rename subtitles using ISO 639-2/B

Posted: 04 Sep 2014, 14:00
by pngl
I'm using Plex together with filebot and AMC, but Plex misidentifies filebot-generated french subtitles. Plex uses ISO 639-2/B (.fre) and filebot uses ISO 639-2/T (.fra).

I've tried modifying AMC in the following way:

After

Code: Select all

def subtitlesFiles = getMissingSubtitles(...)

I've added

Code: Select all

subtitleFiles = subtitleFiles.collect { name = it.name.replace(".fra",".fre"); it.renameTo(name); new File(name) }
Unfortunately, I get a java.lang.NullPointerException: null from somewhere inside filebot's rename function.

How could I fix this? Or is there some other way I could get my subtitles ending .fre.srt instead of .fra.srt?

One idea I have is that rename re-derives the subtitle name from the file name, adding back .fra at the end. Unfortunately, this would require me to modify filebot to fix the issue.

Re: Modify AMC to rename subtitles using ISO 639-2/B

Posted: 04 Sep 2014, 15:17
by rednoah
Check the shared scripts section. There's already an example for this kind of use-case.