From e97e34bbd42814bbb8eb97ccd179ce09bdf714da Mon Sep 17 00:00:00 2001 From: morpheus65535 <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 5 Nov 2018 06:30:50 -0500 Subject: [PATCH 1/4] Fix for missing path returned by Radarr #213 --- bazarr/get_movies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bazarr/get_movies.py b/bazarr/get_movies.py index fd3e3db13..4228eae1d 100644 --- a/bazarr/get_movies.py +++ b/bazarr/get_movies.py @@ -50,7 +50,7 @@ def update_movies(): for movie in r.json(): if movie['hasFile'] is True: if 'movieFile' in movie: - if movie['movieFile']['relativePath'] is not None: + if movie["path"] != None and movie['movieFile']['relativePath'] != None: try: overview = unicode(movie['overview']) except: From dd87c1bffeea32d82edc1047272e59632b773364 Mon Sep 17 00:00:00 2001 From: Halali Date: Mon, 5 Nov 2018 13:09:17 +0100 Subject: [PATCH 2/4] Fix code3b position in DB --- bazarr/create_db.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bazarr/create_db.sql b/bazarr/create_db.sql index 067cac174..dc2188e44 100644 --- a/bazarr/create_db.sql +++ b/bazarr/create_db.sql @@ -28,10 +28,10 @@ CREATE TABLE "table_settings_notifier" ( ); CREATE TABLE "table_settings_languages" ( `code3` TEXT NOT NULL UNIQUE, - `code3b` TEXT, `code2` TEXT, `name` TEXT NOT NULL, `enabled` INTEGER, + `code3b` TEXT, PRIMARY KEY(`code3`) ); CREATE TABLE "table_history" ( From 54b39bf4a4ab07e6425d0012661a769fbf22e602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Tue, 6 Nov 2018 11:39:54 -0500 Subject: [PATCH 3/4] Remove bottle debug mode when not executed in pycharm. --- bazarr/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bazarr/main.py b/bazarr/main.py index ed698df59..73ac07d49 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -74,8 +74,11 @@ if get_proxy_settings()[0] != 'None': from bottle import route, run, template, static_file, request, redirect, response, HTTPError, app, hook import bottle bottle.TEMPLATE_PATH.insert(0, os.path.join(os.path.dirname(__file__), '../views/')) -bottle.debug(True) -bottle.TEMPLATES.clear() +if "PYCHARM_HOSTED" in os.environ: + bottle.debug(True) + bottle.TEMPLATES.clear() +else: + bottle.ERROR_PAGE_TEMPLATE = bottle.ERROR_PAGE_TEMPLATE.replace('if DEBUG and', 'if') from cherrypy.wsgiserver import CherryPyWSGIServer From 3c271ec64e630f4307cad1a937a0d780458fafd1 Mon Sep 17 00:00:00 2001 From: morpheus65535 <5130500+morpheus65535@users.noreply.github.com> Date: Tue, 6 Nov 2018 17:52:09 -0500 Subject: [PATCH 4/4] Some tweak. --- bazarr/main.py | 2 +- views/episodes.tpl | 27 +++++++++++++-------------- views/historymovies.tpl | 6 +++--- views/historyseries.tpl | 6 +++--- views/movie.tpl | 3 +++ views/movies.tpl | 17 +++++++++++------ views/series.tpl | 6 +++--- 7 files changed, 37 insertions(+), 30 deletions(-) diff --git a/bazarr/main.py b/bazarr/main.py index 9a1f987c3..c4662a56c 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -721,7 +721,7 @@ def movies(): offset = (int(page) - 1) * page_size max_page = int(math.ceil(missing_count / (page_size + 0.0))) - c.execute("SELECT tmdbId, title, path_substitution(path), languages, hearing_impaired, radarrId, poster, audio_language, monitored FROM table_movies ORDER BY title ASC LIMIT ? OFFSET ?", (page_size, offset,)) + c.execute("SELECT tmdbId, title, path_substitution(path), languages, hearing_impaired, radarrId, poster, audio_language, monitored, sceneName FROM table_movies ORDER BY title ASC LIMIT ? OFFSET ?", (page_size, offset,)) data = c.fetchall() c.execute("SELECT code2, name FROM table_settings_languages WHERE enabled = 1") languages = c.fetchall() diff --git a/views/episodes.tpl b/views/episodes.tpl index 74d9f0947..b011d0559 100644 --- a/views/episodes.tpl +++ b/views/episodes.tpl @@ -102,8 +102,8 @@
- - + + <% subs_languages = ast.literal_eval(str(details[7])) subs_languages_list = [] @@ -113,7 +113,7 @@ end end %> - +

{{details[0]}}

{{details[1]}}

@@ -165,8 +165,7 @@ Episode - - Title + Title Existing
subtitles Missing
subtitles Manual
search @@ -177,18 +176,18 @@ %if episode[9] == 'True': - + %else: - + %end {{episode[3]}} - - % if episode[8] is not None: - - % end - - {{episode[0]}} + + % if episode[8] is not None: + + % end + {{episode[0]}} + %if episode[4] is not None: % actual_languages = ast.literal_eval(episode[4]) @@ -234,7 +233,7 @@ {{language}} %else: - + {{language}} %end diff --git a/views/historymovies.tpl b/views/historymovies.tpl index e25b537e7..a8b6c6f22 100644 --- a/views/historymovies.tpl +++ b/views/historymovies.tpl @@ -67,11 +67,11 @@ %if row[0] == 0: -
+
%elif row[0] == 1: -
+
%end @@ -80,7 +80,7 @@
{{row[1]}} -
+
{{pretty.date(int(row[2]))}}
diff --git a/views/historyseries.tpl b/views/historyseries.tpl index 0542f9ba2..e1c85ba19 100644 --- a/views/historyseries.tpl +++ b/views/historyseries.tpl @@ -69,11 +69,11 @@ %if row[0] == 0: -
+
%elif row[0] == 1: -
+
%end @@ -95,7 +95,7 @@ %end -
+
{{pretty.date(int(row[4]))}}
diff --git a/views/movie.tpl b/views/movie.tpl index a4afd0489..d32d27889 100644 --- a/views/movie.tpl +++ b/views/movie.tpl @@ -120,6 +120,9 @@

{{details[6]}}
{{details[8]}}
+ % if details[12] is not None: +
{{details[12]}}
+ % end

%for language in subs_languages_list: diff --git a/views/movies.tpl b/views/movies.tpl index 3a321fbb7..fb4391841 100644 --- a/views/movies.tpl +++ b/views/movies.tpl @@ -72,17 +72,22 @@ %if row[8] == "True": - + %else: - + %end - {{row[1]}} + + % if row[9] is not None: + + % end + {{row[1]}} + %if os.path.isfile(row[2]): - + %else: - + %end {{row[2]}} @@ -105,7 +110,7 @@ end end %> -

+
diff --git a/views/series.tpl b/views/series.tpl index ca680ceae..62330c5db 100644 --- a/views/series.tpl +++ b/views/series.tpl @@ -79,9 +79,9 @@ {{row[1]}} %if os.path.isdir(row[2]): - + %else: - + %end {{row[2]}} @@ -127,7 +127,7 @@ end end %> -
+