diff --git a/CHANGES.md b/CHANGES.md index ef4427cf..08ec3fb1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/gui/slick/interfaces/default/home_browseShows.tmpl b/gui/slick/interfaces/default/home_browseShows.tmpl index 6a6d819c..1a6c7cb3 100644 --- a/gui/slick/interfaces/default/home_browseShows.tmpl +++ b/gui/slick/interfaces/default/home_browseShows.tmpl @@ -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
+ title="$re.sub(r'(?m)\s+\((?:19|20)\d\d\)\s*$', '', $title_html)#if $this_show['genres']#
($this_show['genres'])
#end if# +

#echo re.sub(r'([,\.!][^,\.!]*?)$', '...', re.sub(r'([!\?\.])(?=\w)', r'\1 ', $overview))#

+

#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']

+ Click for more at $browse_type"> #if 'poster' in $this_show['images']: #set $image = $this_show['images']['poster']['thumb'] diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 4f36c7d8..4fee4524 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -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'],