From 905c4b279836bf5618acf542ed5d277903520ea9 Mon Sep 17 00:00:00 2001 From: morpheus65535 <5130500+morpheus65535@users.noreply.github.com> Date: Thu, 4 Jan 2018 23:24:11 -0500 Subject: [PATCH] Improving series details panel --- bazarr.py | 12 +++-- views/episodes.tpl | 124 +++++++++++++++++++++++++++++++++++++++++++-- views/series.tpl | 4 +- 3 files changed, 129 insertions(+), 11 deletions(-) diff --git a/bazarr.py b/bazarr.py index 9bc86608b..afd7d4936 100644 --- a/bazarr.py +++ b/bazarr.py @@ -1,4 +1,4 @@ -bazarr_version = '0.2.3' +bazarr_version = '0.2.5' from bottle import route, run, template, static_file, request, redirect, response import bottle @@ -23,8 +23,8 @@ import urllib import math from init_db import * -import update_db -import update_modules +from update_db import * +from update_modules import * import logging from logging.handlers import TimedRotatingFileHandler @@ -204,17 +204,19 @@ def episodes(no): c = conn.cursor() series_details = [] - series_details = c.execute("SELECT title, overview, poster, fanart, hearing_impaired, tvdbid FROM table_shows WHERE sonarrSeriesId LIKE ?", (str(no),)).fetchone() + series_details = c.execute("SELECT title, overview, poster, fanart, hearing_impaired, tvdbid, audio_language, languages, path_substitution(path) FROM table_shows WHERE sonarrSeriesId LIKE ?", (str(no),)).fetchone() tvdbid = series_details[5] episodes = c.execute("SELECT title, path_substitution(path), season, episode, subtitles, sonarrSeriesId, missing_subtitles, sonarrEpisodeId FROM table_episodes WHERE sonarrSeriesId LIKE ? ORDER BY episode ASC", (str(no),)).fetchall() + number = len(episodes) + languages = c.execute("SELECT code2, name FROM table_settings_languages WHERE enabled = 1").fetchall() c.close() episodes = reversed(sorted(episodes, key=operator.itemgetter(2))) seasons_list = [] for key,season in itertools.groupby(episodes,operator.itemgetter(2)): seasons_list.append(list(season)) - return template('episodes', __file__=__file__, bazarr_version=bazarr_version, no=no, details=series_details, seasons=seasons_list, url_sonarr_short=url_sonarr_short, base_url=base_url, tvdbid=tvdbid) + return template('episodes', __file__=__file__, bazarr_version=bazarr_version, no=no, details=series_details, languages=languages, seasons=seasons_list, url_sonarr_short=url_sonarr_short, base_url=base_url, tvdbid=tvdbid, number=number) @route(base_url + 'scan_disk/', method='GET') def scan_disk(no): diff --git a/views/episodes.tpl b/views/episodes.tpl index 5697845d5..2d61b6acc 100644 --- a/views/episodes.tpl +++ b/views/episodes.tpl @@ -48,6 +48,18 @@ padding-right: 2em; padding-bottom: 1em; } + .ui.basic.button:hover, .ui.basic.buttons .button:hover { + background: transparent !important; + } + .ui.basic.button:active, .ui.basic.buttons .button:active { + background: transparent !important; + } + .ui.basic.button:focus, .ui.basic.buttons .button:focus { + background: transparent !important; + } + .ui.basic.button:visited, .ui.basic.buttons .button:visited { + background: transparent !important; + } \ No newline at end of file diff --git a/views/series.tpl b/views/series.tpl index 2c10b2440..2122ca8b2 100644 --- a/views/series.tpl +++ b/views/series.tpl @@ -88,7 +88,7 @@ end end %> -
+
@@ -222,7 +222,7 @@ $('.config').click(function(){ sessionStorage.scrolly=$(window).scrollTop(); - $('#series_form').attr('action', '{{base_url}}edit_series/' + $(this).data("tvdbid")); + $('#series_form').attr('action', '{{base_url}}edit_series/' + $(this).data("no")); $("#series_title").html($(this).data("title")); $("#series_poster").attr("src", "{{base_url}}image_proxy" + $(this).data("poster"));