Page 1 of 1

Only process english subtitles

Posted: 18 Feb 2017, 20:21
by Frederiklol
Hi all,

I have searched google and the forums but not been able to solve this issue.
Got a bunch of movies, in their own folders but with multipe subtitle files(different languages from when i ripped them).

It is possible to define Filebot should only process ".eng.srt" - and just delete the rest?

This is running on a synology - if that matters.

Thanks in advance for any inputs.

Re: Only process english subtitles

Posted: 19 Feb 2017, 14:07
by rednoah
1.
Why not use standard Unix tools to get the job done?

@see https://www.cyberciti.biz/faq/linux-uni ... ove-files/


2.
You can use FileBot to select files matching certain rules like this:

Code: Select all

filebot -mediainfo -r /path/to/files --filter "file.subtitle && lang != /eng/" --format "{file}"

Re: Only process english subtitles

Posted: 20 Feb 2017, 14:38
by Frederiklol
Thanks for fast reply.

Will i be able to use that string of yours, and merge into this (amc)

Code: Select all

filebot -script fn:amc --output "/volume1/Media" --action move -non-strict "/volume1/Sync" --def excludeList=amc.txt --def "ignore=syncthing|tmp" --def unsorted=y --def clean=y --def movieFormat="/volume1/Media/Movies/{y}/{ny}/{ny} {vc}-{vf} {source}{'.'+lang}" --def seriesFormat="/volume1/Media/TV Shows/{n}/Season {s}/{n} - {s00e00} - {t}{'.'+lang}"

Like this?

Code: Select all

filebot -script fn:amc --output "/volume1/Media" --action move -non-strict "/volume1/Sync" --def excludeList=amc.txt --def "ignore=syncthing|tmp" --def unsorted=y --def clean=y --def movieFormat="/volume1/Media/Movies/{y}/{ny}/{ny} {vc}-{vf} {source}{'.'+lang}" --filter "file.subtitle && lang != /eng/" --format "{srt} --def seriesFormat="/volume1/Media/TV Shows/{n}/Season {s}/{n} - {s00e00} - {t}{'.'+lang}"

Re: Only process english subtitles

Posted: 20 Feb 2017, 14:50
by rednoah
You clearly haven't even tried, because it could not possibly work. It'll completely break the automatic episode/movie matching logic in a really funny way.

Re: Only process english subtitles

Posted: 20 Feb 2017, 14:54
by Frederiklol
To be fair, i didn't - because i took me so long to understand the meaning and using of filebot.

So the first code i posted before, is working - the only thing i would like besides that, is it also only process ".eng.srt" - if that is even possible.

But that code you pasted seems to be "it owns" code.
Should i split the two, and run the subtitle one first - and then the AMC script?

Re: Only process english subtitles

Posted: 20 Feb 2017, 14:58
by rednoah
No, it's not possible. That's why I recommended deleting non-English subtitles after the amc script has completed it's run.

The command I posted is only useful as part of a small shell script:

1. List non-English subtitles line by line
2. For each line ➔ Delete

Kinda like this, but with filebot -mediainfo | rm instead of filebot -list | mv:
viewtopic.php?f=8&t=4746#p26479

Re: Only process english subtitles

Posted: 21 Feb 2017, 14:04
by Frederiklol
Thank you for the fast answers once again.
Really appreciated!

I took your advice and process all the .srt files now, and have a shell script to clean up the files i dont want, every night(should have thought of that myself).

A final issue with subtitles. I have some folders where the files is as following;

Movie-name(year).mkv
EN.srt
DK.srt (dan)
Filebot does not recognize that, and just leave the ".srt" files be.
Is there a way for me to force that? It does not have to be changed from dk to dan, but just use it currents name and move the file aswell (Movie-name(year).dk.srt)

Re: Only process english subtitles

Posted: 21 Feb 2017, 14:14
by rednoah
The amc script won't process subtitles that aren't named reasonably well alongside the corresponding video file. FileBot itself wouldn't be able to deal with that well anyway.

If you know that your movies come in this kind of structure, then you can pre-process subtitles and pre-pend the next best movie filename to the subtitle filename.

I recommend using --def subtitles=eng,dan and just have FileBot check for subtitles.

Re: Only process english subtitles

Posted: 21 Feb 2017, 22:39
by Frederiklol
I think i will go for pre-processing, might check that sub fetching out.

Thanks again for your time. Very professional.

Great product, and excellent developer.