From 2b0543d11c6111b20e5f3f6f62a8d9214507be9a Mon Sep 17 00:00:00 2001 From: JackDandy Date: Tue, 28 Apr 2015 18:42:46 +0100 Subject: [PATCH] Change network names to only display on top line of Day by Day layout on Episode View and reposition country part of network name into the hover over in Day by Day layout. --- CHANGES.md | 2 ++ gui/slick/css/style.css | 7 +++++++ gui/slick/interfaces/default/episodeView.tmpl | 4 +++- sickbeard/webserve.py | 4 ++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 7bd1f818..aa67d92c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,7 @@ ### 0.x.x (2015-xx-xx xx:xx:xx UTC) +* Change network names to only display on top line of Day by Day layout on Episode View +* Reposition country part of network name into the hover over in Day by Day layout * Add ToTV provider * Fix Backlog scheduler initialization and change backlog frequency from minutes to days * Change to consolidate and tidy some provider code diff --git a/gui/slick/css/style.css b/gui/slick/css/style.css index 78c5211d..e235e31e 100644 --- a/gui/slick/css/style.css +++ b/gui/slick/css/style.css @@ -1848,6 +1848,7 @@ h2.day, h2.network{ margin-right:auto } +.day-of-week .text .airtime .network, .day-of-week .text .airtime, .day-of-week .text .episode{ overflow:hidden; @@ -1856,6 +1857,12 @@ h2.day, h2.network{ font-size:12px } +.day-of-week .text .airtime .network{ + white-space:nowrap; + text-align:right; + max-width:50% +} + .day-of-week .text .episode .season, .day-of-week .text .episode .number{ font-weight:900 diff --git a/gui/slick/interfaces/default/episodeView.tmpl b/gui/slick/interfaces/default/episodeView.tmpl index ebceb489..2898e82d 100644 --- a/gui/slick/interfaces/default/episodeView.tmpl +++ b/gui/slick/interfaces/default/episodeView.tmpl @@ -1,5 +1,6 @@ #import sickbeard #import datetime +#import re #from sickbeard.common import * #from sickbeard import sbdatetime #from sickbeard.helpers import anon_url @@ -748,7 +749,8 @@
- ${airtime} $cur_result['network'] + #set $match = re.search(r'(.*)\s(\(\w+\))$', $cur_result['network'], re.I | re.M) + ${airtime} %s' % $cur_result['network'] if None is $match else ' title="%s">%s' % ($match.group(2), $match.group(1))#
<%= '%i' % int(cur_result['season']) %>x<%= '%02i' % int(cur_result['episode']) %> diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 2fb4756c..db0f7af1 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -493,6 +493,10 @@ class MainHandler(WebHandler): else: t.layout = sickbeard.EPISODE_VIEW_LAYOUT + # network countries + cache_db = db.DBConnection('cache.db') + t.country_results = ['(%s)' % x['tvrage_country'] for x in cache_db.select('SELECT distinct(tvrage_country) FROM [network_conversions] where tvdb_network like "%(" || tvrage_country || ")" order by tvrage_country')] + return t.respond() def _genericMessage(self, subject, message):