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" ( 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: diff --git a/bazarr/main.py b/bazarr/main.py index 9a1f987c3..8661d1ddf 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 @@ -721,7 +724,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 %> -
+