From 33e4cfc758f0f9223f32c77964813b5e6689b592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Wed, 6 Feb 2019 07:08:28 -0500 Subject: [PATCH] Continuing development --- bazarr/get_subtitle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazarr/get_subtitle.py b/bazarr/get_subtitle.py index f2e31a1e3..edd0ebd21 100644 --- a/bazarr/get_subtitle.py +++ b/bazarr/get_subtitle.py @@ -687,7 +687,7 @@ def refine_from_db(path, video): if isinstance(video, Episode): db = sqlite3.connect(os.path.join(args.config_dir, 'db', 'bazarr.db'), timeout=30) c = db.cursor() - data = c.execute("SELECT table_shows.title, table_episodes.season, table_episodes.episode, table_episodes.title, table_shows.year, table_shows.tvdbId, table_shows.alternateTitles, table_episodes.resolution, table_episodes.video_codec, table_episodes.audio_codec FROM table_episodes INNER JOIN table_shows on table_shows.sonarrSeriesId = table_episodes.sonarrSeriesId WHERE table_episodes.path = ?", (path_replace_reverse(path),)).fetchone() + data = c.execute("SELECT table_shows.title, table_episodes.season, table_episodes.episode, table_episodes.title, table_shows.year, table_shows.tvdbId, table_shows.alternateTitles, table_episodes.format, table_episodes.resolution, table_episodes.video_codec, table_episodes.audio_codec FROM table_episodes INNER JOIN table_shows on table_shows.sonarrSeriesId = table_episodes.sonarrSeriesId WHERE table_episodes.path = ?", (path_replace_reverse(path),)).fetchone() db.close() if data != None: video.series = re.sub(r'(\(\d\d\d\d\))' , '', data[0]) @@ -709,7 +709,7 @@ def refine_from_db(path, video): elif isinstance(video, Movie): db = sqlite3.connect(os.path.join(args.config_dir, 'db', 'bazarr.db'), timeout=30) c = db.cursor() - data = c.execute("SELECT title, year, alternativeTitles, resolution, video_codec, audio_codec FROM table_movies WHERE path = ?", (path_replace_reverse_movie(path),)).fetchone() + data = c.execute("SELECT title, year, alternativeTitles, format, resolution, video_codec, audio_codec FROM table_movies WHERE path = ?", (path_replace_reverse_movie(path),)).fetchone() db.close() if data != None: video.title = re.sub(r'(\(\d\d\d\d\))' , '', data[0])