diff --git a/CHANGES.md b/CHANGES.md
index 8cf35806..103a8723 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -57,6 +57,8 @@
* Change increase the scope and number of non release group text that is identified and removed
* Add a general config setting to allow adding incomplete show data
* Change to throttle connection rate on thread initiation for adba library
+* Change default manage episodes selector to Snatched episodes if items exist else Wanted on Episode Status Manage page
+* Change snatched row colour on Episode Status Manage page to match colour used on the show details page
[develop changelog]
Enable Alpha Ratio again now that the secure login page over https is fixed
diff --git a/gui/slick/interfaces/default/manage_episodeStatuses.tmpl b/gui/slick/interfaces/default/manage_episodeStatuses.tmpl
index 002d4733..a24e908a 100644
--- a/gui/slick/interfaces/default/manage_episodeStatuses.tmpl
+++ b/gui/slick/interfaces/default/manage_episodeStatuses.tmpl
@@ -10,9 +10,9 @@
#import os.path
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
-#if $varExists('header')
+#if $varExists('header')
$header
-#else
+#else
$title
#end if
##
@@ -28,7 +28,7 @@
@@ -36,8 +36,10 @@
##
#else
- #if $whichStatus in ($common.ARCHIVED, $common.IGNORED, $common.SNATCHED):
+ #if $whichStatus in ($common.ARCHIVED, $common.IGNORED):
#set $row_class = 'good'
+ #elif $whichStatus == $common.SNATCHED:
+ #set $row_class = 'snatched'
#else
#set $row_class = $common.Overview.overviewStrings[$whichStatus]
#end if
@@ -108,4 +110,4 @@
#end if
-#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')
\ No newline at end of file
+#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')
diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py
index 6236238a..e9a8821b 100644
--- a/sickbeard/webserve.py
+++ b/sickbeard/webserve.py
@@ -2558,12 +2558,17 @@ class Manage(MainHandler):
t.submenu = self.ManageMenu()
t.whichStatus = whichStatus
+ my_db = db.DBConnection()
+ sql_result = my_db.select(
+ 'SELECT COUNT(*) AS snatched FROM [tv_episodes] WHERE season > 0 AND episode > 0 AND airdate > 1 AND ' +
+ 'status IN (%s)' % ','.join([str(quality) for quality in Quality.SNATCHED + Quality.SNATCHED_PROPER]))
+ t.default_manage = sql_result and sql_result[0]['snatched'] and SNATCHED or WANTED
+
# if we have no status then this is as far as we need to go
if not status_list:
return t.respond()
- myDB = db.DBConnection()
- status_results = myDB.select(
+ status_results = my_db.select(
'SELECT show_name, tv_shows.indexer_id as indexer_id, airdate FROM tv_episodes, tv_shows WHERE tv_episodes.status IN (' + ','.join(
['?'] * len(
status_list)) + ') AND season != 0 AND tv_episodes.showid = tv_shows.indexer_id ORDER BY show_name',