From 994b76845f3f93893864eb41d3643055775f937c Mon Sep 17 00:00:00 2001 From: morpheus65535 <5130500+morpheus65535@users.noreply.github.com> Date: Sun, 31 Dec 2017 16:24:52 -0500 Subject: [PATCH] Correction fixing issue #31 --- list_subtitles.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/list_subtitles.py b/list_subtitles.py index fe7649114..e109d259a 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -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