mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-20 16:43:43 +00:00
Merge pull request #550 from JackDandy/feature/ChangeESMdefault
Change default manage episodes selector to Snatched episodes if items…
This commit is contained in:
commit
d60180b366
3 changed files with 16 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
<h1 class="header">$header</h1>
|
||||
#else
|
||||
#else
|
||||
<h1 class="title">$title</h1>
|
||||
#end if
|
||||
##
|
||||
|
@ -28,7 +28,7 @@
|
|||
<select name="whichStatus" class="form-control form-control-inline input-sm" style="margin:0 10px">
|
||||
|
||||
#for $curStatus in [$common.SKIPPED, $common.UNKNOWN, $common.SNATCHED, $common.WANTED, $common.ARCHIVED, $common.IGNORED]:
|
||||
<option value="$curStatus">$common.statusStrings[$curStatus]</option>
|
||||
<option value="$curStatus"#echo ('', ' selected="selected"')[$curStatus == $default_manage]#>$common.statusStrings[$curStatus]</option>
|
||||
#end for
|
||||
|
||||
</select>
|
||||
|
@ -36,8 +36,10 @@
|
|||
</form>
|
||||
##
|
||||
#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 @@
|
|||
</form>
|
||||
|
||||
#end if
|
||||
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')
|
||||
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue