diff --git a/bazarr/config.py b/bazarr/config.py index bf325c9bd..ead8c0e78 100644 --- a/bazarr/config.py +++ b/bazarr/config.py @@ -42,6 +42,7 @@ defaults = { 'embedded_subs_show_desired': 'True', 'utf8_encode': 'True', 'ignore_pgs_subs': 'False', + 'ignore_vobsub_subs': 'False', 'adaptive_searching': 'False', 'enabled_providers': '', 'throtteled_providers': '{}', diff --git a/bazarr/list_subtitles.py b/bazarr/list_subtitles.py index f1c3b6df3..e2082ee84 100644 --- a/bazarr/list_subtitles.py +++ b/bazarr/list_subtitles.py @@ -30,8 +30,8 @@ def store_subtitles(original_path, reversed_path): subtitle_languages = embedded_subs_reader.list_languages(reversed_path) for subtitle_language, subtitle_forced, subtitle_codec in subtitle_languages: try: - if settings.general.getboolean("ignore_pgs_subs") and subtitle_codec == "PGS": - logging.debug("BAZARR skipping pgs sub for language: " + str(alpha2_from_alpha3(subtitle_language))) + if (settings.general.getboolean("ignore_pgs_subs") and subtitle_codec == "PGS") or (settings.general.getboolean("ignore_vobsub_subs") and subtitle_codec == "VOBSUB"): + logging.debug("BAZARR skipping %s sub for language: %s" % (subtitle_codec, alpha2_from_alpha3(subtitle_language))) continue if alpha2_from_alpha3(subtitle_language) is not None: @@ -106,8 +106,8 @@ def store_subtitles_movie(original_path, reversed_path): subtitle_languages = embedded_subs_reader.list_languages(reversed_path) for subtitle_language, subtitle_forced, subtitle_codec in subtitle_languages: try: - if settings.general.getboolean("ignore_pgs_subs") and subtitle_codec == "PGS": - logging.debug("BAZARR skipping pgs sub for language: " + str(alpha2_from_alpha3(subtitle_language))) + if (settings.general.getboolean("ignore_pgs_subs") and subtitle_codec == "PGS") or (settings.general.getboolean("ignore_vobsub_subs") and subtitle_codec == "VOBSUB"): + logging.debug("BAZARR skipping %s sub for language: %s" % (subtitle_codec, alpha2_from_alpha3(subtitle_language))) continue if alpha2_from_alpha3(subtitle_language) is not None: diff --git a/views/settingssubtitles.html b/views/settingssubtitles.html index 7ab3b805b..3f17b810a 100644 --- a/views/settingssubtitles.html +++ b/views/settingssubtitles.html @@ -227,6 +227,20 @@ Subtitles' is enabled. +