mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-14 18:04:43 +08:00
Correction fixing issue #31
This commit is contained in:
parent
3a4e646c76
commit
994b76845f
1 changed files with 7 additions and 4 deletions
|
@ -21,9 +21,11 @@ def list_subtitles(file):
|
||||||
try:
|
try:
|
||||||
languages.append([str(pycountry.languages.lookup(subtitle_track.language).alpha_2),None])
|
languages.append([str(pycountry.languages.lookup(subtitle_track.language).alpha_2),None])
|
||||||
except:
|
except:
|
||||||
pass
|
print subtitle_track.language
|
||||||
|
#pass
|
||||||
except:
|
except:
|
||||||
pass
|
print file
|
||||||
|
#pass
|
||||||
|
|
||||||
subtitles = core.search_external_subtitles(file)
|
subtitles = core.search_external_subtitles(file)
|
||||||
|
|
||||||
|
@ -43,12 +45,13 @@ def store_subtitles(file):
|
||||||
|
|
||||||
for subtitle_track in mkv.subtitle_tracks:
|
for subtitle_track in mkv.subtitle_tracks:
|
||||||
try:
|
try:
|
||||||
languages.append([str(pycountry.languages.lookup(subtitle_track.language).alpha_2),None])
|
actual_subtitles.append([str(pycountry.languages.lookup(subtitle_track.language).alpha_2),None])
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
subtitles = core.search_external_subtitles(file)
|
subtitles = core.search_external_subtitles(file)
|
||||||
|
|
||||||
for subtitle, language in subtitles.iteritems():
|
for subtitle, language in subtitles.iteritems():
|
||||||
|
@ -59,7 +62,7 @@ def store_subtitles(file):
|
||||||
|
|
||||||
c_db.execute("UPDATE table_episodes SET subtitles = ? WHERE path = ?", (str(actual_subtitles), path_replace_reverse(file)))
|
c_db.execute("UPDATE table_episodes SET subtitles = ? WHERE path = ?", (str(actual_subtitles), path_replace_reverse(file)))
|
||||||
conn_db.commit()
|
conn_db.commit()
|
||||||
|
|
||||||
c_db.close()
|
c_db.close()
|
||||||
|
|
||||||
return actual_subtitles
|
return actual_subtitles
|
||||||
|
|
Loading…
Reference in a new issue