mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-04-24 06:37:16 -04:00
Fix for #624.
This commit is contained in:
parent
8799938b4e
commit
2ddcbf6d7a
1 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
import enzyme
|
||||
from enzyme.exceptions import MalformedMKVError
|
||||
import logging
|
||||
import os
|
||||
import subprocess
|
||||
|
@ -29,7 +30,10 @@ class EmbeddedSubsReader:
|
|||
else:
|
||||
if os.path.splitext(file)[1] == '.mkv':
|
||||
with open(file, 'rb') as f:
|
||||
mkv = enzyme.MKV(f)
|
||||
try:
|
||||
mkv = enzyme.MKV(f)
|
||||
except MalformedMKVError:
|
||||
logging.error('BAZARR cannot analyze this MKV with our built-in MKV parser, you should install ffmpeg: ' + file)
|
||||
for subtitle_track in mkv.subtitle_tracks:
|
||||
subtitles_list.append([subtitle_track.language, subtitle_track.forced, subtitle_track.codec_id])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue