suball excluded?

Any questions? Need some help?
Post Reply
garyleecn
Donor
Posts: 114
Joined: 19 Nov 2014, 03:48

suball excluded?

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

Re: suball excluded?

Post 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.
:idea: Please read the FAQ and How to Request Help.
garyleecn
Donor
Posts: 114
Joined: 19 Nov 2014, 03:48

Re: suball excluded?

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

Re: suball excluded?

Post 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.
:idea: Please read the FAQ and How to Request Help.
garyleecn
Donor
Posts: 114
Joined: 19 Nov 2014, 03:48

Re: suball excluded?

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

Re: suball excluded?

Post 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]+"
:idea: Please read the FAQ and How to Request Help.
Meph88
Donor
Posts: 35
Joined: 29 Jun 2014, 15:46

Re: suball excluded?

Post 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.
garyleecn
Donor
Posts: 114
Joined: 19 Nov 2014, 03:48

Re: suball excluded?

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

Re: suball excluded?

Post by rednoah »

:idea: Please read the FAQ and How to Request Help.
Post Reply