mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Change add season info to "Show: Trakt New Seasons" view on the Add from Trakt page.
This commit is contained in:
parent
cbd659f179
commit
be30fbdc67
3 changed files with 19 additions and 2 deletions
|
@ -67,6 +67,7 @@
|
|||
* Change improve existing show page and the handling when an attempt to add a show to an existing location
|
||||
* Change consolidate Trakt Trending and Recommended views into an "Add From Trakt" view which defaults to trending
|
||||
* Change Trakt view drop down "Show" to reveal Brand-new Shows, Season Premieres, Recommendations and Trending views
|
||||
* Change add season info to "Show: Trakt New Seasons" view on the Add from Trakt page
|
||||
* Change increase number of displayed Trakt shows to 100
|
||||
* Add genres and rating to all Trakt shows
|
||||
* Add AniDb Random and Hot to Add Show page
|
||||
|
|
|
@ -163,12 +163,22 @@
|
|||
#if $all_shows
|
||||
#for $this_show in $all_shows:
|
||||
#set $title_html = $this_show['title'].replace('"', '"').replace("'", ''')
|
||||
#if 'newseasons' == $kwargs.get('mode', '')
|
||||
#set $overview = '%s: %s' % (
|
||||
('Season %s' % $this_show['episode_season'], 'Brand-new')[1 == $this_show['episode_season']],
|
||||
($this_show['overview'], $this_show['episode_overview'])[any($this_show['episode_overview']) and 1 != $this_show['episode_season']])
|
||||
#else
|
||||
#set $overview = $this_show['overview']
|
||||
#end if
|
||||
|
||||
<div class="browse-show <%= ('notinlibrary', 'inlibrary')[':' in this_show['show_id']] %>" data-name="#echo re.sub(r'([\'\"])', r'', $this_show['title'])#" data-rating="$this_show['rating']" data-votes="$this_show['votes']" data-premiered="$this_show['premiered']">
|
||||
<div class="browse-container">
|
||||
<div class="browse-image">
|
||||
<a class="browse-image" href="<%= anon_url(this_show['url_src_db']) %>" target="_blank"
|
||||
title="<span style='color: rgb(66, 139, 202)'>$re.sub(r'(?m)\s+\((?:19|20)\d\d\)\s*$', '', $title_html)</span>#if $this_show['genres']#<br /><div style='font-weight:bold'>(<em>$this_show['genres']</em>)</div>#end if#<p style='margin:0 0 2px'><%= re.sub(r'([,\.!][^,\.!]*?)$', '...', this_show['overview']) %></p><p><span style='font-weight:bold;font-size:0.9em;color:#888'><em>First aired: $this_show['premiered_str']</em></span></p><span style='float:right'>Click for more at <span class='boldest'>$browse_type</span></span>">
|
||||
title="<span style='color: rgb(66, 139, 202)'>$re.sub(r'(?m)\s+\((?:19|20)\d\d\)\s*$', '', $title_html)</span>#if $this_show['genres']#<br /><div style='font-weight:bold'>(<em>$this_show['genres']</em>)</div>#end if#
|
||||
<p style='margin:0 0 2px'>#echo re.sub(r'([,\.!][^,\.!]*?)$', '...', re.sub(r'([!\?\.])(?=\w)', r'\1 ', $overview))#</p>
|
||||
<p><span style='font-weight:bold;font-size:0.9em;color:#888'><em>#if $kwargs and 'newseasons' == $kwargs.get('mode', None)#Air#else#First air#end if##echo ('s', 'ed')[$this_show['when_past']]#: $this_show['premiered_str']</em></span></p>
|
||||
<span style='float:right'>Click for more at <span class='boldest'>$browse_type</span></span>">
|
||||
#if 'poster' in $this_show['images']:
|
||||
#set $image = $this_show['images']['poster']['thumb']
|
||||
<img alt="" class="browse-image" src="#if $image and 'http' != $image[:4]#$sbRoot/#end if#$image" />
|
||||
|
|
|
@ -2353,6 +2353,7 @@ class NewHomeAddShows(Home):
|
|||
ids=ids,
|
||||
premiered=dt_ordinal,
|
||||
premiered_str=dt_string,
|
||||
when_past=dt_ordinal < datetime.datetime.now().toordinal(), # air time not yet available 16.11.2015
|
||||
title=title.strip(),
|
||||
images=images,
|
||||
url_src_db='http://anidb.net/perl-bin/animedb.pl?show=anime&aid=%s' % ids['anidb'],
|
||||
|
@ -2379,7 +2380,7 @@ class NewHomeAddShows(Home):
|
|||
|
||||
filtered = []
|
||||
footnote = None
|
||||
start_year, end_year = (datetime.date.today().year - 10, datetime.date.today().year)
|
||||
start_year, end_year = (datetime.date.today().year - 10, datetime.date.today().year + 1)
|
||||
url = 'http://www.imdb.com/search/title?at=0&sort=moviemeter&title_type=tv_series&year=%s,%s' % (start_year, end_year)
|
||||
html = helpers.getURL(url)
|
||||
if html:
|
||||
|
@ -2437,6 +2438,7 @@ class NewHomeAddShows(Home):
|
|||
filtered.append(dict(
|
||||
premiered=dt_ordinal,
|
||||
premiered_str=year or 'No year',
|
||||
when_past=dt_ordinal < datetime.datetime.now().toordinal(), # air time not yet available 16.11.2015
|
||||
genres='No genre yet' if not len(genres) else genres[0].get_text().lower().replace(' |', ','),
|
||||
ids=ids,
|
||||
images=images,
|
||||
|
@ -2536,6 +2538,10 @@ class NewHomeAddShows(Home):
|
|||
filtered.append(dict(
|
||||
premiered=dt_ordinal,
|
||||
premiered_str=dt_string,
|
||||
when_past=dt_ordinal < datetime.datetime.now().toordinal(), # air time not yet available 16.11.2015
|
||||
episode_number='' if 'episode' not in item else item['episode']['number'] or 1,
|
||||
episode_overview='' if 'episode' not in item else item['episode']['overview'] or '',
|
||||
episode_season='' if 'episode' not in item else item['episode']['season'] or 1,
|
||||
genres='' if 'genres' not in item['show'] else ', '.join(['%s' % v for v in item['show']['genres']]),
|
||||
ids=item['show']['ids'],
|
||||
images='' if 'images' not in item['show'] else item['show']['images'],
|
||||
|
|
Loading…
Reference in a new issue