diff --git a/CHANGES.md b/CHANGES.md index 69a50de2..d60f1cdc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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) diff --git a/gui/slick/interfaces/default/home_trendingShows.tmpl b/gui/slick/interfaces/default/home_trendingShows.tmpl index 41997405..032ee11f 100644 --- a/gui/slick/interfaces/default/home_trendingShows.tmpl +++ b/gui/slick/interfaces/default/home_trendingShows.tmpl @@ -131,7 +131,7 @@ #set $image = re.sub(r'(.*)(\..*?)$', r'\1-300\2', $cur_show['images']['poster'], 0, re.IGNORECASE | re.MULTILINE) -
+
@@ -146,11 +146,11 @@ $cur_show['ratings']['votes'] votes
-#if 'ExistsInLibrary' in $cur_show['tvdb_id']: -

In library

+#if ':' in $cur_show['show_id']: +

In library

#else #set $encoded_show_title = urllib.quote($cur_show['title'].encode("utf-8")) - Add Show + Add Show #end if
diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index c9794b75..bb45a5fd 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -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)