Browse Source

common: Fix subtitle reading (read as SubRipFile)

master
Jakub Valenta 2 years ago
parent
commit
3e40ffc2c5
  1. 3
      tv_series/common.py

3
tv_series/common.py

@ -38,8 +38,9 @@ def convert_match_to_list(match):
def read_subs(file_path):
subs = pysrt.SubRipFile()
with open(file_path, errors='ignore') as f:
subs = list(pysrt.stream(f))
subs.read(f)
return subs

Loading…
Cancel
Save