Subtitles, first nl then en, and rename after

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
pven
Posts: 3
Joined: 10 Nov 2015, 09:54

Subtitles, first nl then en, and rename after

Post by pven »

First of all: I am quite new to filebot, and I already love it a lot!

What I want to do, but what is quite hard for me. When I have a movie.mkv I want to download subs. Currently it download subs to ie movie.nld.srt, after that I need to rename it otherwise my Popcorn Box won't recognize the subs.

I created a simple script, but it is not completely what I want:

Code: Select all

#!/bin/sh
filebot -script fn:suball --lang nl --log-file filebot.log /volume1/Movies
filebot -script fn:suball --lang en --log-file filebot.log /volume1/Movies
filebot -script fn:replace --action copy --conflict override --def "e=.eng.srt" "r=.srt" --log-file filebot.log .
filebot -script fn:replace --action copy --conflict override --def "e=.nld.srt" "r=.srt" --log-file filebot.log .

What sucks:
(- when there is already a srt-file it won't be overwritten) fixed by adding 'copy' and 'override', I think
- when a dutch srt-file is already there, overwriting is useless
- when I am right: when movie.srt is already there, it won't look for other subs

Can you please advice me how to improve this script? Or maybe combine some commands (right now it takes 1 minute per movie)? Everything is welcome. :)
User avatar
rednoah
The Source
Posts: 23005
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Subtitles, first nl then en, and rename after

Post by rednoah »

1.
filebot -script fn:suball won't allow you to fetch subtitles for files that already have subtitles in the given language. If there's subtitle files without language tag, those will count for any
language.

2.
You're renaming your *.eng.srt and *.nld.srt to the same filename. So the Dutch subtitles are always gonna override the English ones when you do your second filebot -script fn:replace call.
:idea: Please read the FAQ and How to Request Help.
pven
Posts: 3
Joined: 10 Nov 2015, 09:54

Re: Subtitles, first nl then en, and rename after

Post by pven »

Thanks for the answer!

Just for my view. Imagine I have the following files on my system:
- movie.mkv
- movie.en.srt
- movie.srt
Will filebot download dutch subs when available, or will it skip it because movie.srt exists?

Update: ah, 'any language'. Can I override this option?

Indeed: nl is leading, en is secondary. First I copy movie.en.srt to movie.srt, so I have english subs. But dutch is preferred, so if dutch subs are available, this should be copied from movie.nl.srt to movie.srt that will overwrite english subs if they were already there.

Maybe all of this can be done easier, that's why I opened this topic. :)
User avatar
rednoah
The Source
Posts: 23005
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Subtitles, first nl then en, and rename after

Post by rednoah »

Well, it's not impossible, but getting around filebot anti-abuse rules certainly won't make it any easier.

The real issue certainly lies with your HTPC software, so ask them to fix the problem, or use Kodi/Plex instead. ;)
:idea: Please read the FAQ and How to Request Help.
pven
Posts: 3
Joined: 10 Nov 2015, 09:54

Re: Subtitles, first nl then en, and rename after

Post by pven »

Thanks again!

My Popbox won't be fixed anymore, it is not supported anympore ... :cry:

Using a htpc or kodi/plex orso is no option (yet). I'll think of a solution, for the time being it is ok to perform extra manual actions.
Post Reply