Merge remote-tracking branch 'origin/development' into development

pull/550/head
Louis Vézina 5 years ago
commit 262ab090d5

@ -27,7 +27,7 @@ class EmbeddedSubsReader:
detected_languages = []
for detected_language in data['subtitles']:
subtitles_list.append([detected_language['language'], detected_language['forced']])
subtitles_list.append([detected_language['language'], detected_language['forced'], detected_language["codec"]])
else:
if os.path.splitext(file)[1] == '.mkv':
with open(file, 'rb') as f:

@ -36,8 +36,12 @@ def store_subtitles(file):
logging.debug("BAZARR is trying to index embedded subtitles.")
try:
subtitle_languages = embedded_subs_reader.list_languages(file)
for subtitle_language, subtitle_forced in subtitle_languages:
for subtitle_language, subtitle_forced, subtitle_codec in subtitle_languages:
try:
if settings.general.getboolean("ignore_pgs_subs") and subtitle_codec == "hdmv_pgs_subtitle":
logging.debug("BAZARR skipping pgs sub for language: " + str(alpha2_from_alpha3(subtitle_language)))
continue
if alpha2_from_alpha3(subtitle_language) is not None:
lang = str(alpha2_from_alpha3(subtitle_language))
if subtitle_forced:
@ -128,8 +132,12 @@ def store_subtitles_movie(file):
logging.debug("BAZARR is trying to index embedded subtitles.")
try:
subtitle_languages = embedded_subs_reader.list_languages(file)
for subtitle_language, subtitle_forced in subtitle_languages:
for subtitle_language, subtitle_forced, subtitle_codec in subtitle_languages:
try:
if settings.general.getboolean("ignore_pgs_subs") and subtitle_codec == "hdmv_pgs_subtitle":
logging.debug("BAZARR skipping pgs sub for language: " + str(alpha2_from_alpha3(subtitle_language)))
continue
if alpha2_from_alpha3(subtitle_language) is not None:
lang = str(alpha2_from_alpha3(subtitle_language))
if subtitle_forced:

Loading…
Cancel
Save