From 6c25ee69df69c66270bb09f8d34278d6fc0d3313 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Sat, 21 Mar 2015 17:47:16 +0000 Subject: [PATCH] Change to add clarity to the subtitle and other columns on the Mass Update page. Add tooltips to explain why any the 6 action columns are disabled when required. Change to reclaimed screen estate by hiding unused columns. Change option on Mass Edit page to be inline with show edit page. Change reduce whitespace output, simplify and cleanup code to standards. --- CHANGES.md | 4 + gui/slick/css/style.css | 4 + gui/slick/interfaces/default/manage.tmpl | 309 ++++++++++-------- .../interfaces/default/manage_massEdit.tmpl | 299 +++++++++-------- 4 files changed, 321 insertions(+), 295 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index cb01c587..d211d2d2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -65,6 +65,10 @@ * Change to separate "Set as wanted" to prevent disaster selection on Episode Overview page * Remove restriction to not display snatched eps link in footer on Episode Overview page * Change the shows episodes count text colour to visually separete from year numbers at the end of show names +* Change to add clarity to the subtitle and other columns on the Mass Update page +* Add tooltips to explain why any the 6 action columns are disabled when required on the Mass Update page +* Change to reclaimed screen estate by hiding unused columns on the Mass Update page +* Change order of option on Mass Edit page to be inline with show edit page * Fix release group not recognised from manually downloaded filename * Change to gracefully handle some "key not found" failures when TVDB or TVRage return "Not Found" during show updates * Change no longer stamp files where airdates are never diff --git a/gui/slick/css/style.css b/gui/slick/css/style.css index 49dad9e1..8fcd06cc 100644 --- a/gui/slick/css/style.css +++ b/gui/slick/css/style.css @@ -3310,6 +3310,10 @@ tablesorter.css vertical-align:middle } +.tablesorter .narrow.tablesorter-header{ + padding:4px 18px 4px 4px +} + .tablesorter thead .sorter-false{ background-image:none; padding:4px; diff --git a/gui/slick/interfaces/default/manage.tmpl b/gui/slick/interfaces/default/manage.tmpl index 6202e551..c4d25674 100644 --- a/gui/slick/interfaces/default/manage.tmpl +++ b/gui/slick/interfaces/default/manage.tmpl @@ -1,80 +1,92 @@ #import sickbeard #from sickbeard.common import * -#set global $title="Mass Update" -#set global $header="Mass Update" +#set global $title = 'Mass Update' +#set global $header = 'Mass Update' -#set global $sbPath="../.." +#set global $sbPath = '../..' -#set global $topmenu="manage" +#set global $topmenu = 'manage' #import os.path -#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") +#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl') +#set $has_any_sports = False +#set $has_any_anime = False +#set $has_any_flat_folders = False +#set $myShowList = $sickbeard.showList +$myShowList.sort(lambda x, y: cmp(x.name, y.name)) +#for $curShow in $myShowList + #set $has_any_sports |= bool($curShow.sports) + #set $has_any_anime |= bool($curShow.anime) + #set $has_any_flat_folders |= $bool(curShow.flatten_folders) +#end for -#if $varExists('header') +#if $varExists('header')

$header

-#else +#else

$title

#end if
@@ -82,113 +94,122 @@ - - - - - - - - - - - - - #if $sickbeard.USE_SUBTITLES: - - #end if - - - + + + +#if $has_any_sports + +#end if + +#if $has_any_anime + +#end if +#if $has_any_flat_folders + +#end if + + + + + +#if $sickbeard.USE_SUBTITLES + +#end if +## + + - - + + - #set $myShowList = $sickbeard.showList - $myShowList.sort(lambda x, y: cmp(x.name, y.name)) - - #for $curShow in $myShowList: - #set $curEp = $curShow.nextaired - #set $curUpdate_disabled = "" - #set $curRefresh_disabled = "" - #set $curRename_disabled = "" - #set $curSubtitle_disabled = "" - #set $curDelete_disabled = "" - #set $curRemove_disabled = "" - #if $sickbeard.showQueueScheduler.action.isBeingUpdated($curShow) or $sickbeard.showQueueScheduler.action.isInUpdateQueue($curShow): - #set $curUpdate_disabled = "disabled=\"disabled\" " - #end if - - #set $curUpdate = "" - - #if $sickbeard.showQueueScheduler.action.isBeingRefreshed($curShow) or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow): - #set $curRefresh_disabled = "disabled=\"disabled\" " - #end if - - #set $curRefresh = "" - - #if $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow) or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow): - #set $curRename = "disabled=\"disabled\" " - #end if - - #set $curRename = "" - - #if not $curShow.subtitles or $sickbeard.showQueueScheduler.action.isBeingSubtitled($curShow) or $sickbeard.showQueueScheduler.action.isInSubtitleQueue($curShow): - #set $curSubtitle_disabled = "disabled=\"disabled\" " - #end if - - #set $curSubtitle = "" - - #if $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow) or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow) or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow): - #set $curDelete = "disabled=\"disabled\" " - #end if - - #set $curDelete = "" - - #if $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow) or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow) or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow): - #set $curRemove = "disabled=\"disabled\" " - #end if - - #set $curRemove = "" - +#set $disabled = ' disabled="disabled"' +#set $disabled_inprogress_tip = ' title="%s action is currently in progress for this show"' +#set $disabled_subtitles_tip = ' title="Use edit to enable subtitle search for this show"' +#set $no = 'no16.png" title="No" alt="No' +#set $yes = 'yes16.png" title="Yes" alt="Yes' +#for $curShow in $myShowList + #set $option_state = ''.format(str($curShow.indexerid)) + #slurp + #set $curUpdate_disabled = $sickbeard.showQueueScheduler.action.isBeingUpdated($curShow)\ + or $sickbeard.showQueueScheduler.action.isInUpdateQueue($curShow) + #set $reason = $disabled_inprogress_tip % 'Update' + #set $curUpdate = '%s>%s' % (('', $reason)[$curUpdate_disabled], + $option_state % ('update', 'update', ('', $disabled + $reason)[$curUpdate_disabled])) + #slurp + #set $curRefresh_disabled = $sickbeard.showQueueScheduler.action.isBeingRefreshed($curShow)\ + or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow) + #set $reason = $disabled_inprogress_tip % 'Rescan' + #set $curRefresh = '%s>%s' % (('', $reason)[$curRefresh_disabled], + $option_state % ('refresh', 'refresh', ('', $disabled + $reason)[$curRefresh_disabled])) + #slurp + #set $curRename_disabled = $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow)\ + or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow) + #set $reason = $disabled_inprogress_tip % 'Rename' + #set $curRename = '%s>%s' % (('', $reason)[$curRename_disabled], + $option_state % ('rename', 'rename', ('', $disabled + $reason)[$curRename_disabled])) + #slurp + #set $subtitles_disabled = not $curShow.subtitles\ + or $sickbeard.showQueueScheduler.action.isBeingSubtitled($curShow)\ + or $sickbeard.showQueueScheduler.action.isInSubtitleQueue($curShow) + #set $reason = ($disabled_inprogress_tip % 'Search subtitle', $disabled_subtitles_tip)[not $curShow.subtitles] + #set $curSubtitle = '%s>%s' % (('', $reason)[$subtitles_disabled], + $option_state % ('subtitle', 'subtitle', ('', $disabled + $reason)[$subtitles_disabled])) + #slurp + #set $curDelete_disabled = $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow)\ + or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow)\ + or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow) + #set $reason = $disabled_inprogress_tip % 'Rename or rescan' + #set $curDelete = '%s>%s' % (('', $reason)[$curDelete_disabled], + $option_state % ('delete', 'delete', ('', $disabled + $reason)[$curDelete_disabled])) + #slurp + #set $curRemove_disabled = $sickbeard.showQueueScheduler.action.isBeingRenamed($curShow)\ + or $sickbeard.showQueueScheduler.action.isInRenameQueue($curShow)\ + or $sickbeard.showQueueScheduler.action.isInRefreshQueue($curShow) + ##set $reason = $disabled_inprogress_tip % 'Rename or rescan' + #set $curRemove = '%s>%s' % (('', $reason)[$curRemove_disabled], + $option_state % ('remove', 'remove', ('', $disabled + $reason)[$curRemove_disabled])) - + - #if $curShow.quality in $qualityPresets: + #if $curShow.quality in $qualityPresets - #else: + #else - #end if - - - - - + #end if + #if $has_any_sports + + #end if + + #if $has_any_anime + + #end if + #if $has_any_flat_folders + + #end if + - - - - #if $sickbeard.USE_SUBTITLES: - - #end if - - + - - #end for - +#end for
Edit
Show NameQualitySportsSceneAnimeFlat FoldersPausedStatusUpdate
Rescan
Rename
Subtitle
Delete
Remove
Edit
Show NameQualitySportsSceneAnimeFlat
Folders
PausedStatusUpdate
Rescan
Rename
Search
Subtitle
Delete
Remove
$curShow.name$qualityPresetStrings[$curShow.quality]Custom\"Y\""\"Y\""\"Y\""\"Y\""\"Y\"" $curShow.status$curUpdate$curRefresh$curRename$curSubtitle$curDelete$curRemove + + + #if $sickbeard.USE_SUBTITLES + + #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') diff --git a/gui/slick/interfaces/default/manage_massEdit.tmpl b/gui/slick/interfaces/default/manage_massEdit.tmpl index 9a680060..03a6be0c 100644 --- a/gui/slick/interfaces/default/manage_massEdit.tmpl +++ b/gui/slick/interfaces/default/manage_massEdit.tmpl @@ -1,187 +1,184 @@ #import sickbeard #from sickbeard import common #from sickbeard import exceptions -#set global $title="Mass Edit" -#set global $header="Mass Edit" +#set global $title = 'Mass Edit' +#set global $header = 'Mass Edit' -#set global $sbPath=".." +#set global $sbPath = '..' -#set global $topmenu="manage"# +#set global $topmenu = 'manage'# #import os.path -#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") -#if $quality_value != None: -#set $initial_quality = int($quality_value) +#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl') +#if None is not $quality_value: + #set $initial_quality = int($quality_value) #else: -#set $initial_quality = $common.SD + #set $initial_quality = $common.SD #end if #set $anyQualities, $bestQualities = $common.Quality.splitQuality($initial_quality)
- + -
-Root Directories *
- #for $cur_dir in $root_dir_list: - #set $cur_index = $root_dir_list.index($cur_dir) -
- - - $cur_dir => $cur_dir -
- - - #end for +
+ Parent folder *
+#set $selected = 'selected="selected"' +#for $cur_dir in $root_dir_list: + #set $cur_index = $root_dir_list.index($cur_dir) +
+ + + $cur_dir => $cur_dir +
+ + +#end for +
-
+
+ Paused +
+ +

+
-
-Quality -
- -

+
+ Quality +
+ +

-
-
-

Inital

- #set $anyQualityList = filter(lambda x: x > $common.Quality.NONE, $common.Quality.qualityStrings) - -
-
-

Archive

- #set $bestQualityList = filter(lambda x: x > $common.Quality.SDTV, $common.Quality.qualityStrings) - -
-
-
-
+
+
+

Inital

+#set $anyQualityList = filter(lambda x: x > $common.Quality.NONE, $common.Quality.qualityStrings) + +
+
+

Archive

+#set $bestQualityList = filter(lambda x: x > $common.Quality.SDTV, $common.Quality.qualityStrings) + +

+
+
#if $anyQualities + $bestQualities: -#set $isSelected = ' selected="selected"' -#set $isEnabled = $isSelected -#set $isDisabled = $isSelected -#if $archive_firstmatch_value##set $isDisabled = ''##else##set $isEnabled = ''##end if# -
-Archive on first match -
- -
-
+ #set $isSelected = ' selected="selected"' + #set $isEnabled = $isSelected + #set $isDisabled = $isSelected + #if $archive_firstmatch_value##set $isDisabled = ''##else##set $isEnabled = ''##end if# +
+ Archive on first match +
+ +
+
#end if -
-Flatten Folders * -
- -
-
+
+ Flat folder structure * +
+ +
+
-
- Paused -
- -

-
+
+ Air by date episode names +
+ +

+
-
- Scene Numbering -
- -

-
+
+ Scene numbering +
+ +

+
-
- Anime -
- -

-
+
+ Subtitles +
+ +

+
-
- Sports -
- -

-
+
+ Show is sports +
+ +

+
-
- Air-By-Date -
- -

-
+
+ Show is anime +
+ +

+
-
-Subtitles -
- -

-
- -
-
* - Changing these settings will cause the selected shows to be refreshed. -
- -
-
-
+
+ * + Changing these settings will cause selected shows to be refreshed +
+
+
+

-#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')