Added settings to ignore ASS embedded subtitles

This commit is contained in:
morpheus65535 2021-05-06 09:18:40 -04:00
parent 0f9ec102b7
commit 3d7b532cb6
3 changed files with 16 additions and 2 deletions

View File

@ -55,6 +55,7 @@ defaults = {
'utf8_encode': 'True', 'utf8_encode': 'True',
'ignore_pgs_subs': 'False', 'ignore_pgs_subs': 'False',
'ignore_vobsub_subs': 'False', 'ignore_vobsub_subs': 'False',
'ignore_ass_subs': 'False',
'adaptive_searching': 'False', 'adaptive_searching': 'False',
'enabled_providers': '[]', 'enabled_providers': '[]',
'multithreading': 'True', 'multithreading': 'True',

View File

@ -40,7 +40,9 @@ def store_subtitles(original_path, reversed_path):
try: try:
if (settings.general.getboolean("ignore_pgs_subs") and subtitle_codec.lower() == "pgs") or \ if (settings.general.getboolean("ignore_pgs_subs") and subtitle_codec.lower() == "pgs") or \
(settings.general.getboolean("ignore_vobsub_subs") and subtitle_codec.lower() == (settings.general.getboolean("ignore_vobsub_subs") and subtitle_codec.lower() ==
"vobsub"): "vobsub") or \
(settings.general.getboolean("ignore_ass_subs") and subtitle_codec.lower() ==
"ass"):
logging.debug("BAZARR skipping %s sub for language: %s" % (subtitle_codec, alpha2_from_alpha3(subtitle_language))) logging.debug("BAZARR skipping %s sub for language: %s" % (subtitle_codec, alpha2_from_alpha3(subtitle_language)))
continue continue
@ -158,7 +160,9 @@ def store_subtitles_movie(original_path, reversed_path):
try: try:
if (settings.general.getboolean("ignore_pgs_subs") and subtitle_codec.lower() == "pgs") or \ if (settings.general.getboolean("ignore_pgs_subs") and subtitle_codec.lower() == "pgs") or \
(settings.general.getboolean("ignore_vobsub_subs") and subtitle_codec.lower() == (settings.general.getboolean("ignore_vobsub_subs") and subtitle_codec.lower() ==
"vobsub"): "vobsub") or \
(settings.general.getboolean("ignore_ass_subs") and subtitle_codec.lower() ==
"ass"):
logging.debug("BAZARR skipping %s sub for language: %s" % (subtitle_codec, alpha2_from_alpha3(subtitle_language))) logging.debug("BAZARR skipping %s sub for language: %s" % (subtitle_codec, alpha2_from_alpha3(subtitle_language)))
continue continue

View File

@ -176,6 +176,15 @@ const SettingsSubtitlesView: FunctionComponent = () => {
Ignores VobSub Subtitles in Embedded Subtitles detection. Ignores VobSub Subtitles in Embedded Subtitles detection.
</Message> </Message>
</Input> </Input>
<Input>
<Check
label="Ignore Embedded ASS Subtitles"
settingKey="settings-general-ignore_ass_subs"
></Check>
<Message>
Ignores ASS Subtitles in Embedded Subtitles detection.
</Message>
</Input>
<Input> <Input>
<Check <Check
label="Show Only Desired Languages" label="Show Only Desired Languages"