Page 1 of 1

suball excluded?

Posted: 06 Oct 2015, 21:45
by garyleecn
hey, I'm running a suball script regularly to fetch missing subtitle, and the code is like following

Code: Select all

#!/bin/bash
filebot -script fn:suball /Volumes/Data/Videos/ --def "ignoreTextLanguage=fr|en" subtitles=zho,eng --lang Chinese
but I'm seeing a lot 'exclude: /***'
and i know this is because there are sometimes embedded subtitles in the video files.


so here's my two questions.
1. so my "ignoreTextLanguage=fr|en", is this code correct?
i don't know if i remembered it incorrectly or what, but it seems it's excluding french-sub-only files as well.
2. is there a command to exclude all languages except English, or like Chinese?
this is because sometimes when a video file is downloaded, i don't even know what subtitle is embedded into it, sometimes there are lots of languages i don't even know what it is.....

Re: suball excluded?

Posted: 07 Oct 2015, 08:55
by rednoah
0.
Keep in mind...
Manual wrote: :!: If you call this script repeatedly on the same folders or files then you MUST SET --def maxAgeDays to 30 days or less and call it no more than once per day.

1.
All subtitles that contain either "fr" or "en" subtitles, based on a text match. It'll exclude everything from "fr" to "fra" to "Fritz" to "The End". Whatever language tag is encoded into the container.

@see https://github.com/filebot/scripts/blob ... groovy#L40


2.
Why? If you want English then you set ignoreTextLanguage to English so you won't download English subtitles for files that already have English subtitles. Same with every other language. You'd usually set ignoreTextLanguage to all the languages you can already read, so if it's not one of them, it'll download subtitles in your desired language.


3.
btw, this argument does absolutely nothing:

Code: Select all

--def subtitles=zho,eng
The suball script is not the amc script.

Re: suball excluded?

Posted: 08 Oct 2015, 07:44
by garyleecn
rednoah wrote:0.
Keep in mind...
Manual wrote: :!: If you call this script repeatedly on the same folders or files then you MUST SET --def maxAgeDays to 30 days or less and call it no more than once per day.

1.
All subtitles that contain either "fr" or "en" subtitles, based on a text match. It'll exclude everything from "fr" to "fra" to "Fritz" to "The End". Whatever language tag is encoded into the container.

@see https://github.com/filebot/scripts/blob ... groovy#L40


2.
Why? If you want English then you set ignoreTextLanguage to English so you won't download English subtitles for files that already have English subtitles. Same with every other language. You'd usually set ignoreTextLanguage to all the languages you can already read, so if it's not one of them, it'll download subtitles in your desired language.


3.
btw, this argument does absolutely nothing:

Code: Select all

--def subtitles=zho,eng
The suball script is not the amc script.
0. I'm working on that :)

1. so you are saying the if i use ignore***="AB" it will exclude all languages starting with "AB" and "The AB", or it will exclude titles starting with "AB" and "The AB"

2. so if i wanna download chinese subtitles, and keep downloading unless there is a chinese one, (i.e., ignore all other languages..), i should

Code: Select all

ignoreTextLanguage=zh
since i have hazel there automatically renaming ***.zho.srt (filebot name for chinese subs from shooter, thanks btw) to ***.zh.srt (so that plex recognizes it), should i exclude zh or zho?

3. so i just deleted them :)


thanks for advices


btw, i've modified the code as following

Code: Select all

#!/bin/bash
filebot -script fn:suball /Volumes/Data/Videos/ --def "ignoreTextLanguage=zh” --lang Chinese

Re: suball excluded?

Posted: 08 Oct 2015, 08:00
by rednoah
1.
It's based on the TextLanguageList MediaInfo value (use MediaInfo to see values for specific files). It has nothing to do with the filename.

2.
I'd use zh because zho contains zh anyway.

Re: suball excluded?

Posted: 13 Oct 2015, 20:03
by garyleecn
thanks for your tips, it's working a LOT better now.

just wondering if it's possible to disable opensubtitles for a specific language, e.g., only use shooter for chinese, and only use opensubtitles when searching for english sub?

Re: suball excluded?

Posted: 14 Oct 2015, 05:45
by rednoah
Have you tried?

Code: Select all

--db "射手网"
You can do stuff like:

Code: Select all

--db "OpenSubtitles|射手网"
Or any Regular Expression:

Code: Select all

--db "O.+S.+"

Code: Select all

--db "[^a-z]+"

Re: suball excluded?

Posted: 02 Jul 2016, 23:33
by Meph88
2. so if i wanna download chinese subtitles, and keep downloading unless there is a chinese one, (i.e., ignore all other languages..), i should

Code: Select all

ignoreTextLanguage=zh
since i have hazel there automatically renaming ***.zho.srt (filebot name for chinese subs from shooter, thanks btw) to ***.zh.srt (so that plex recognizes it), should i exclude zh or zho?
Can you link this hazel renamer?
That would be super useful for my setup.

Re: suball excluded?

Posted: 27 Jul 2016, 23:48
by garyleecn
Meph88 wrote:
2. so if i wanna download chinese subtitles, and keep downloading unless there is a chinese one, (i.e., ignore all other languages..), i should

Code: Select all

ignoreTextLanguage=zh
since i have hazel there automatically renaming ***.zho.srt (filebot name for chinese subs from shooter, thanks btw) to ***.zh.srt (so that plex recognizes it), should i exclude zh or zho?
Can you link this hazel renamer?
That would be super useful for my setup.

i use brew cask to install (maybe you should try it as well?)
but I'm sure if you search "hazel mac" on google you'll get what you want

Re: suball excluded?

Posted: 18 Feb 2022, 10:52
by rednoah