mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
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.
This commit is contained in:
parent
1a21189edf
commit
67c3352eee
3 changed files with 19 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
### 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
|
* Change footer stats to not add newlines when copy/pasting from them
|
||||||
* Remove redundant references from Config/Help & Info
|
* Remove redundant references from Config/Help & Info
|
||||||
|
@ -45,7 +45,8 @@
|
||||||
* Change case of labels in General Config/Interface/Timezone
|
* 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
|
* Split enabled from not enabled providers in the Configure Provider drop down on the Providers Options tab
|
||||||
* Fix typo on General Config/Misc
|
* 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)
|
### 0.3.1 (2014-11-19 16:40:00 UTC)
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
|
|
||||||
#set $image = re.sub(r'(.*)(\..*?)$', r'\1-300\2', $cur_show['images']['poster'], 0, re.IGNORECASE | re.MULTILINE)
|
#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="traktContainer">
|
||||||
<div class="trakt-image">
|
<div class="trakt-image">
|
||||||
<a class="trakt-image" href="<%= anon_url(cur_show['url']) %>" target="_blank"><img alt="" class="trakt-image" src="${image}" /></a>
|
<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>
|
<i>$cur_show['ratings']['votes'] votes</i>
|
||||||
|
|
||||||
<div class="traktShowTitleIcons">
|
<div class="traktShowTitleIcons">
|
||||||
#if 'ExistsInLibrary' in $cur_show['tvdb_id']:
|
#if ':' in $cur_show['show_id']:
|
||||||
<p style="line-height: 1.5; padding: 2px 5px 3px">In library</p>
|
<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
|
#else
|
||||||
#set $encoded_show_title = urllib.quote($cur_show['title'].encode("utf-8"))
|
#set $encoded_show_title = urllib.quote($cur_show['title'].encode("utf-8"))
|
||||||
<a href="$sbRoot/home/addTraktShow?indexer_id=${cur_show['tvdb_id']}&showName=${encoded_show_title}" class="btn btn-xs">Add Show</a>
|
<a href="$sbRoot/home/addTraktShow?indexer_id=${cur_show['show_id']}&showName=${encoded_show_title}" class="btn btn-xs">Add Show</a>
|
||||||
#end if
|
#end if
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2993,9 +2993,18 @@ class NewHomeAddShows(MainHandler):
|
||||||
t.trending_inlibrary = 0
|
t.trending_inlibrary = 0
|
||||||
if None is not t.trending_shows:
|
if None is not t.trending_shows:
|
||||||
for item in t.trending_shows:
|
for item in t.trending_shows:
|
||||||
if helpers.findCertainShow(sickbeard.showList, int(item['tvdb_id'])):
|
tvdbs = ['tvdb_id', 'tvrage_id']
|
||||||
t.trending_inlibrary += 1
|
for index, tvdb in enumerate(tvdbs):
|
||||||
item['tvdb_id'] = u'ExistsInLibrary'
|
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)
|
return _munge(t)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue