Merge branch 'release/0.4.0' into develop

This commit is contained in:
JackDandy 2014-11-23 04:06:48 +00:00
commit d90af06c2c
3 changed files with 19 additions and 8 deletions

View file

@ -9,7 +9,7 @@
* Fix adding show from TVRage API
### 0.4.0 (2014-11-22 02:52:00 UTC)
### 0.4.0 (2014-11-23 03:27:00 UTC)
* Change footer stats to not add newlines when copy/pasting from them
* Remove redundant references from Config/Help & Info
@ -56,6 +56,8 @@
* Change case of labels in General Config/Interface/Timezone
* Split enabled from not enabled providers in the Configure Provider drop down on the Providers Options tab
* Fix typo on General Config/Misc
* Fix Add Trending Shows "Not In library" now filters tvrage added shows
* Add a hover over text "In library" on Add Trending Shows to display tv database show was added from
### 0.3.1 (2014-11-19 16:40:00 UTC)

View file

@ -131,7 +131,7 @@
#set $image = re.sub(r'(.*)(\..*?)$', r'\1-300\2', $cur_show['images']['poster'], 0, re.IGNORECASE | re.MULTILINE)
<div class="trakt_show <%= ('notinlibrary', 'inlibrary')['ExistsInLibrary' in cur_show['tvdb_id']] %>" data-name="$cur_show['title']" data-rating="$cur_show['ratings']['percentage']" data-votes="$cur_show['ratings']['votes']">
<div class="trakt_show <%= ('notinlibrary', 'inlibrary')[':' in cur_show['show_id']] %>" data-name="$cur_show['title']" data-rating="$cur_show['ratings']['percentage']" data-votes="$cur_show['ratings']['votes']">
<div class="traktContainer">
<div class="trakt-image">
<a class="trakt-image" href="<%= anon_url(cur_show['url']) %>" target="_blank"><img alt="" class="trakt-image" src="${image}" /></a>
@ -146,11 +146,11 @@
<i>$cur_show['ratings']['votes'] votes</i>
<div class="traktShowTitleIcons">
#if 'ExistsInLibrary' in $cur_show['tvdb_id']:
<p style="line-height: 1.5; padding: 2px 5px 3px">In library</p>
#if ':' in $cur_show['show_id']:
<p style="line-height: 1.5; padding: 2px 5px 3px" title="<%= '%s added' % ('TVRage', 'theTVDB')['1' == cur_show['show_id'][:1]] %>">In library</p>
#else
#set $encoded_show_title = urllib.quote($cur_show['title'].encode("utf-8"))
<a href="$sbRoot/home/addTraktShow?indexer_id=${cur_show['tvdb_id']}&amp;showName=${encoded_show_title}" class="btn btn-xs">Add Show</a>
<a href="$sbRoot/home/addTraktShow?indexer_id=${cur_show['show_id']}&amp;showName=${encoded_show_title}" class="btn btn-xs">Add Show</a>
#end if
</div>
</div>

View file

@ -2994,9 +2994,18 @@ class NewHomeAddShows(MainHandler):
t.trending_inlibrary = 0
if None is not t.trending_shows:
for item in t.trending_shows:
if helpers.findCertainShow(sickbeard.showList, int(item['tvdb_id'])):
t.trending_inlibrary += 1
item['tvdb_id'] = u'ExistsInLibrary'
tvdbs = ['tvdb_id', 'tvrage_id']
for index, tvdb in enumerate(tvdbs):
try:
item[u'show_id'] = item[tvdb]
tvshow = helpers.findCertainShow(sickbeard.showList, int(item[tvdb]))
except:
continue
# check tvshow indexer is not using the same id from another indexer
if tvshow and (index + 1) == tvshow.indexer:
item[u'show_id'] = u'%s:%s' % (tvshow.indexer, item[tvdb])
t.trending_inlibrary += 1
break
return _munge(t)