Only process english subtitles

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Frederiklol
Posts: 9
Joined: 18 Feb 2017, 19:06

Only process english subtitles

Post 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.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Only process english subtitles

Post 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}"
:idea: Please read the FAQ and How to Request Help.
Frederiklol
Posts: 9
Joined: 18 Feb 2017, 19:06

Re: Only process english subtitles

Post 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}"
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Only process english subtitles

Post 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.
:idea: Please read the FAQ and How to Request Help.
Frederiklol
Posts: 9
Joined: 18 Feb 2017, 19:06

Re: Only process english subtitles

Post 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?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Only process english subtitles

Post 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
:idea: Please read the FAQ and How to Request Help.
Frederiklol
Posts: 9
Joined: 18 Feb 2017, 19:06

Re: Only process english subtitles

Post 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)
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Only process english subtitles

Post 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.
:idea: Please read the FAQ and How to Request Help.
Frederiklol
Posts: 9
Joined: 18 Feb 2017, 19:06

Re: Only process english subtitles

Post 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.
Post Reply