Merge pull request #286 from JackDandy/feature/AddSetStatusOfRemoved

Add "Status of removed episodes" to apply (or not) a preferred status...
This commit is contained in:
JackDandy 2015-03-17 17:35:02 +00:00
commit 0736ade54d
8 changed files with 86 additions and 35 deletions

View file

@ -51,6 +51,11 @@
* Add automatic compression of old log files
* Remove whitespace and semi-colon redundancy from CSS shedding 4.5kb
* Change overhaul menu and button icons
* Add "Status of removed episodes" to apply (or not) a preferred status to episodes whose files are detected as removed.
"Archived" can now be set so that removed episodes still count toward download completion stats. See setting on page
config/Post Processing/File Handling
* Remove redundant "Skip remove detection" from the config/Post Processing/File Handling page
* Change to highlight the current selected item in combos on page config/Post Processing
[develop changelog]
* Fix traceback error when using the menu item Manage/Update Kodi

View file

@ -1201,6 +1201,7 @@ browser.css
/* =======================================================================
formWizard
========================================================================== */
.step,
legend.legendStep{
color:#fff

View file

@ -127,6 +127,7 @@ inc_top.tmpl
color:#140F06;
text-decoration:none
}
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited{
color:#222;
text-decoration:none
@ -1150,6 +1151,7 @@ browser.css
/* =======================================================================
formWizard
========================================================================== */
.step,
legend.legendStep{
color:#57442b

View file

@ -276,6 +276,7 @@ inc_top.tmpl
color:#140F06;
text-decoration:none
}
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited{
color:#222;
text-decoration:none
@ -510,14 +511,17 @@ inc_bottom.tmpl
/* =======================================================================
inc_rootDirs.tmpl
========================================================================== */
.rootdir-selectbox,
.rootdir-selectbox #rootDirs,
.rootdir-controls{
width:430px
}
.rootdir-selectbox{
padding:0 0 5px
}
.rootdir-controls{
text-align:center
}
@ -549,12 +553,12 @@ home.tmpl
}
#HomeLayout{margin-top:-35px}
#HomeLayout.not-poster{height:75px }
#HomeLayout.not-poster{height:75px}
#HomeLayout div.not-poster{position:relative;top:38px}
#HomeLayout span.not-poster{margin-top:-30px }
#HomeLayout span.not-poster{margin-top:-30px}
#HomeLayout.poster{margin-top:-35px}
#HomeLayout span.poster{margin-bottom:10px }
#search_show_name{margin-top:0 }
#HomeLayout span.poster{margin-bottom:10px}
#search_show_name{margin-top:0}
.ui-progressbar{
height:20px;
@ -666,12 +670,15 @@ home.tmpl
border-left:0;
border-right:0
}
.ui-progressbar .ui-progressbar-value{
height:20px
}
.ui-progressbar .progress-20{
border:none
}
.show .progress-20,
.show .progress-40,
.show .progress-60,
@ -816,7 +823,7 @@ home_addShows.tmpl
margin-left:auto
}
#addShowPortal a{
#addShowPortal a{
padding:0 20px;
width:360px;
float:left;
@ -872,6 +879,7 @@ div.buttontext p{
/* =======================================================================
home_newShow.tmpl
========================================================================== */
#addShowForm,
#newShowPortal,
fieldset.sectionwrap,
@ -1221,21 +1229,27 @@ ul.tags li a{
background-color:#eae2c8;
color:#666
}
.unaired{
background-color:#f5f1e4
}
.skipped{
background-color:#bedeed
}
.good{
background-color:#c3e3c8
}
.qual{
background-color:#ffda8a
}
.wanted{
background-color:#ffb0b0
}
.snatched{
background-color:#ebc1ea
}
@ -1300,6 +1314,7 @@ span.snatched b{
empty-cells:show;
color:#000
}
.sickbeardTable.display_show{
clear:both
}
@ -1400,12 +1415,14 @@ td.col-search{
width:150px;
vertical-align:top
}
.options-on-right{
width:180px;
float:right;
vertical-align:middle;
height:100%
}
.options-on-right .showLegendRight{
padding-right:6px;
padding-bottom:1px
@ -1666,12 +1683,15 @@ h2.day, h2.network{
.day-of-week .text .episode .number{
font-weight:900
}
.day-of-week .text .episode .season{
margin-right:2px
}
.day-of-week .text .episode .number{
margin-left:2px
}
.day-of-week .episode-blank{
width:250px;
height:32px;
@ -1719,11 +1739,13 @@ h2.day, h2.network{
.on-air1{
text-align:right
}
.on-air0{
background-color:#dfd !important;
filter:alpha(opacity=75);
opacity:.75
}
.on-air1{
color:#295730 !important;
border-left:1px solid #295730 !important;
@ -1775,9 +1797,11 @@ h2.day, h2.network{
.carousel-control .glyphicon-chevron-left{
margin-left:-10px
}
.carousel-control .glyphicon-chevron-right{
margin-right:-10px
}
.carousel-control .glyphicon-chevron-left,
.carousel-control .glyphicon-chevron-right{
width:20px;
@ -1883,6 +1907,10 @@ config*.tmpl
padding-left:20px
}
#config span.component-title.input{
line-height:24px
}
.stepDiv span.component-title.input{
line-height:30px
}
@ -1912,6 +1940,7 @@ config*.tmpl
#config label.space-right{
margin-right:20px
}
#config .metadataDiv{
display:none
}
@ -1922,7 +1951,12 @@ config*.tmpl
}
select .selected{
font-weight:700
font-weight:700;
color:#888
}
select .selected:before{
content:"> "
}
.jumbo{
@ -1935,6 +1969,7 @@ select .selected{
font-size:13px !important;
margin-bottom:10px
}
#editShow .field-pair #customQuality h4{
margin-bottom:1px
}
@ -2044,15 +2079,19 @@ select .selected{
.icon16-github{
background-position:0 0
}
.icon16-mirc{
background-position:-26px 0
}
.icon16-sg{
background-position:-52px 0
}
.icon16-web{
background-position:-78px 0
}
.icon16-win{
background-position:-104px 0
}
@ -3180,6 +3219,7 @@ div.formpaginate .prev, div.formpaginate .next{
.stepDiv{
padding:15px
}
.stepDiv.parent-folder{
padding:15px 0 0;
width:430px;
@ -3277,6 +3317,7 @@ thead.tablesorter-stickyHeader{
.tablesorter .filtered{
display:none
}
.tablesorter input.tablesorter-filter{
width:98%;
height:auto;
@ -3332,7 +3373,7 @@ ul.token-input-list{
padding:0 0 1px 0;
background-color:#fff;
list-style-type:none;
/* clear:left;*/
/* clear:left; */
border-top-left-radius:3px;
border-top-right-radius:3px;
border-bottom-left-radius:3px;
@ -3347,7 +3388,7 @@ ul.token-input-list li input{
border:0;
padding:3px 4px;
background-color:white
/* -webkit-appearance:caret;*/
/* -webkit-appearance:caret; */
}
li.token-input-token{

View file

@ -24,7 +24,7 @@
<h1 class="title">$title</h1>
#end if
#set $checked = 'checked="checked"'
#set $selected = 'selected="selected"'
#set $selected = 'selected="selected" class="selected"'
<div id="config" class="pp">
<div id="config-content">
@ -64,16 +64,12 @@
<div class="field-pair">
<label for="process_method">
<span class="component-title">Process episode method</span>
<span class="component-title input">Process episode method</span>
<span class="component-desc">
<select name="process_method" id="process_method" class="form-control input-sm">
#set $process_method_text = {'copy': "Copy", 'move': "Move", 'hardlink': "Hard Link", 'symlink' : "Symbolic Link"}
#set $process_method_text = {'copy': 'Copy', 'move': 'Move', 'hardlink': 'Hard Link', 'symlink' : 'Symbolic Link'}
#for $curAction in ('copy', 'move', 'hardlink', 'symlink'):
#if $sickbeard.PROCESS_METHOD == $curAction:
#set $process_method = $selected
#else
#set $process_method = ''
#end if
#set $process_method = ('', $selected)[$sickbeard.PROCESS_METHOD == $curAction]
<option value="$curAction" $process_method>$process_method_text[$curAction]</option>
#end for
</select>
@ -182,11 +178,17 @@
<div class="field-pair">
<label for="skip_removed_files">
<span class="component-title">Skip remove detection</span>
<span class="component-title input">Status of removed episodes</span>
<span class="component-desc">
<input type="checkbox" name="skip_removed_files" id="skip_removed_files" #if $sickbeard.SKIP_REMOVED_FILES == True then $checked else ''#>
<p>skip detection of removed files so the episode is not set to ignored<br />
<b>note:</b> this may mean SickGear misses renames as well</p>
<select name="skip_removed_files" id="skip_removed_files" class="form-control form-control-inline input-sm">
#set $opt_selected = ($sickbeard.SKIP_REMOVED_FILES, $IGNORED)[not $sickbeard.SKIP_REMOVED_FILES]
#for $cur_status in [1, $SKIPPED, $ARCHIVED, $IGNORED]:
#set $opt_text = ('Will Be Untouched', 'Set ' + $statusStrings[$cur_status] + ('', ' (default)')[$IGNORED == $cur_status])[1 != $cur_status]
<option value="$cur_status"#echo ('', ' ' + $selected)[$cur_status == $opt_selected]#>$opt_text</option>
#end for
</select>
<span><strong><em>untouched</em></strong> may mean SickGear also misses renames</span>
</span>
</label>
</div>
@ -307,7 +309,7 @@
<div class="field-pair">
<label for="name_presets">
<span class="component-title">Name pattern</span>
<span class="component-title input">Name pattern</span>
<span class="component-desc">
<select id="name_presets" class="form-control input-sm">
#set is_custom = True
@ -458,11 +460,11 @@
<div class="field-pair">
<label for="naming_multi_ep">
<span class="component-title">Multi episode style</span>
<span class="component-title input">Multi episode style</span>
<span class="component-desc">
<select id="naming_multi_ep" name="naming_multi_ep" class="form-control input-sm">
#for $cur_multi_ep in sorted($multiEpStrings.items(), key=lambda x: x[1]):
<option value="$cur_multi_ep[0]" #if $sickbeard.NAMING_MULTI_EP == $cur_multi_ep[0] then 'selected="selected" class="selected"' else ''#>$cur_multi_ep[1]</option>
<option value="$cur_multi_ep[0]" #if $sickbeard.NAMING_MULTI_EP == $cur_multi_ep[0] then $selected else ''#>$cur_multi_ep[1]</option>
#end for
</select>
</span>
@ -528,7 +530,7 @@
<fieldset class="component-group-list">
<div class="field-pair right">
<label for="name_abd_presets">
<span class="component-title">Air-by-date name pattern</span>
<span class="component-title input">Air-by-date name pattern</span>
<span class="component-desc">
<select id="name_abd_presets" class="form-control input-sm">
#set is_abd_custom = True
@ -726,7 +728,7 @@
<fieldset class="component-group-list">
<div class="field-pair right">
<label for="name_sports_presets">
<span class="component-title">Sports name pattern</span>
<span class="component-title input">Sports name pattern</span>
<span class="component-desc">
<select id="name_sports_presets" class="form-control input-sm">
#set is_sports_custom = True
@ -929,7 +931,7 @@
<fieldset class="component-group-list">
<div class="field-pair right">
<label for="name_anime_presets">
<span class="component-title">Anime name pattern</span>
<span class="component-title input">Anime name pattern</span>
<span class="component-desc">
<select id="name_anime_presets" class="form-control input-sm">
#set is_anime_custom = True
@ -1079,11 +1081,11 @@
<div class="field-pair">
<label for="naming_anime_multi_ep">
<span class="component-title">Multi episode style</span>
<span class="component-title input">Multi episode style</span>
<span class="component-desc">
<select id="naming_anime_multi_ep" name="naming_anime_multi_ep" class="form-control input-sm">
#for $cur_multi_ep in sorted($multiEpStrings.items(), key=lambda x: x[1]):
<option value="$cur_multi_ep[0]" #if $sickbeard.NAMING_ANIME_MULTI_EP == $cur_multi_ep[0] then 'selected="selected" class="selected"' else ''#>$cur_multi_ep[1]</option>
<option value="$cur_multi_ep[0]" #if $sickbeard.NAMING_ANIME_MULTI_EP == $cur_multi_ep[0] then $selected else ''#>$cur_multi_ep[1]</option>
#end for
</select>
</span>
@ -1179,7 +1181,7 @@
<fieldset class="component-group-list">
<div class="field-pair">
<label>
<span class="component-title">Metadata target</span>
<span class="component-title input">Metadata target</span>
<span class="component-desc">
#set $m_dict = $metadata.get_metadata_generator_dict()
<select id="metadataType" class="form-control input-sm">

View file

@ -704,7 +704,7 @@ def initialize(consoleLogging=True):
RECENTSEARCH_STARTUP = bool(check_setting_int(CFG, 'General', 'recentsearch_startup', 0))
BACKLOG_STARTUP = bool(check_setting_int(CFG, 'General', 'backlog_startup', 0))
SKIP_REMOVED_FILES = bool(check_setting_int(CFG, 'General', 'skip_removed_files', 0))
SKIP_REMOVED_FILES = check_setting_int(CFG, 'General', 'skip_removed_files', 0)
USENET_RETENTION = check_setting_int(CFG, 'General', 'usenet_retention', 500)

View file

@ -1101,14 +1101,14 @@ class TVShow(object):
os.path.normpath(self.location)):
# check if downloaded files still exist, update our data if this has changed
if not sickbeard.SKIP_REMOVED_FILES:
if 1 != sickbeard.SKIP_REMOVED_FILES:
with curEp.lock:
# if it used to have a file associated with it and it doesn't anymore then set it to IGNORED
if curEp.location and curEp.status in Quality.DOWNLOADED:
logger.log(str(self.indexerid) + u": Location for " + str(season) + "x" + str(
episode) + " doesn't exist, removing it and changing our status to IGNORED",
curEp.status = (sickbeard.SKIP_REMOVED_FILES, IGNORED)[not sickbeard.SKIP_REMOVED_FILES]
logger.log(u'%s: File no longer at location for s%02de%02d, episode removed and status changed to %s'
% (str(self.indexerid), season, episode, statusStrings[curEp.status]),
logger.DEBUG)
curEp.status = IGNORED
curEp.subtitles = list()
curEp.subtitles_searchcount = 0
curEp.subtitles_lastsearch = str(datetime.datetime.min)

View file

@ -3623,7 +3623,7 @@ class ConfigPostProcessing(Config):
sickbeard.NAMING_STRIP_YEAR = config.checkbox_to_value(naming_strip_year)
sickbeard.USE_FAILED_DOWNLOADS = config.checkbox_to_value(use_failed_downloads)
sickbeard.DELETE_FAILED = config.checkbox_to_value(delete_failed)
sickbeard.SKIP_REMOVED_FILES = config.checkbox_to_value(skip_removed_files)
sickbeard.SKIP_REMOVED_FILES = config.minimax(skip_removed_files, IGNORED, 1, IGNORED)
sickbeard.NFO_RENAME = config.checkbox_to_value(nfo_rename)
sickbeard.METADATA_XBMC = xbmc_data