Correction fixing issue #31

This commit is contained in:
morpheus65535 2017-12-31 16:24:52 -05:00
parent 3a4e646c76
commit 994b76845f
1 changed files with 7 additions and 4 deletions

View File

@ -21,9 +21,11 @@ def list_subtitles(file):
try:
languages.append([str(pycountry.languages.lookup(subtitle_track.language).alpha_2),None])
except:
pass
print subtitle_track.language
#pass
except:
pass
print file
#pass
subtitles = core.search_external_subtitles(file)
@ -43,12 +45,13 @@ def store_subtitles(file):
for subtitle_track in mkv.subtitle_tracks:
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:
pass
except:
pass
subtitles = core.search_external_subtitles(file)
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)))
conn_db.commit()
c_db.close()
return actual_subtitles