mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-04 15:12:23 -05:00
Mass update: Add option for default episode status
This commit is contained in:
parent
91cb8d885c
commit
2fc5358283
@ -58,14 +58,15 @@
|
||||
5: { sorter: 'anime'},
|
||||
6: { sorter: 'flatfold'},
|
||||
7: { sorter: 'paused'},
|
||||
8: { sorter: 'status'},
|
||||
9: { sorter: false},
|
||||
8: { sorter: 'default_ep_status'},
|
||||
9: { sorter: 'status'},
|
||||
10: { sorter: false},
|
||||
11: { sorter: false},
|
||||
12: { sorter: false},
|
||||
13: { sorter: false},
|
||||
13: { sorter: false},
|
||||
14: { sorter: false},
|
||||
15: { sorter: false}
|
||||
15: { sorter: false},
|
||||
16: { sorter: false}
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -90,6 +91,7 @@
|
||||
<th class="col-legend">Anime</th>
|
||||
<th class="col-legend">Flat Folders</th>
|
||||
<th class="col-legend">Paused</th>
|
||||
<th class="col-legend">Default Ep<br>Status</th>
|
||||
<th class="col-legend">Status</th>
|
||||
<th width="1%">Update<br/><input type="checkbox" class="bulkCheck" id="updateCheck" /></th>
|
||||
<th width="1%">Rescan<br/><input type="checkbox" class="bulkCheck" id="refreshCheck" /></th>
|
||||
@ -173,6 +175,7 @@
|
||||
<td align="center"><img src="$sbRoot/images/#if int($curShow.flatten_folders) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td>
|
||||
<td align="center"><img src="$sbRoot/images/#if int($curShow.paused) == 1 then "yes16.png\" alt=\"Y\"" else "no16.png\" alt=\"N\""# width="16" height="16" /></td>
|
||||
<td align="center">$curShow.status</td>
|
||||
<td align="center">$statusStrings[$curShow.default_ep_status]</td>
|
||||
<td align="center">$curUpdate</td>
|
||||
<td align="center">$curRefresh</td>
|
||||
<td align="center">$curRename</td>
|
||||
|
@ -1,5 +1,6 @@
|
||||
#import sickbeard
|
||||
#from sickbeard import common
|
||||
#from sickbeard.common import *
|
||||
#from sickbeard import exceptions
|
||||
#set global $title="Mass Edit"
|
||||
#set global $header="Mass Edit"
|
||||
@ -111,6 +112,18 @@
|
||||
</div><br />
|
||||
</div>
|
||||
|
||||
<div class="optionWrapper">
|
||||
<span class="selectTitle">Default Episode Status:</span>
|
||||
<div class="selectChoices">
|
||||
<select id="edit_default_ep_status" name="default_ep_status" class="form-control form-control-inline input-sm">
|
||||
<option value="keep">< keep ></option>
|
||||
#for $curStatus in [$WANTED, $SKIPPED, $ARCHIVED, $IGNORED]:
|
||||
<option value="$curStatus" #if $curStatus == $default_ep_status_value then 'selected="selected"' else ''#>$statusStrings[$curStatus]</option>
|
||||
#end for
|
||||
</select>
|
||||
</div><br />
|
||||
</div>
|
||||
|
||||
<div class="optionWrapper">
|
||||
<span class="selectTitle">Scene Numbering</span>
|
||||
<div class="selectChoices">
|
||||
|
@ -29,4 +29,4 @@ $(document).ready(function(){
|
||||
$('#display_new_root_dir_'+cur_id).html('<b>DELETED</b>');
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
@ -1375,13 +1375,13 @@ class Home(WebRoot):
|
||||
showObj.sports = sports
|
||||
showObj.subtitles = subtitles
|
||||
showObj.air_by_date = air_by_date
|
||||
showObj.default_ep_status = int(defaultEpStatus)
|
||||
|
||||
if not directCall:
|
||||
showObj.lang = indexer_lang
|
||||
showObj.dvdorder = dvdorder
|
||||
showObj.rls_ignore_words = rls_ignore_words.strip()
|
||||
showObj.rls_require_words = rls_require_words.strip()
|
||||
showObj.default_ep_status = int(defaultEpStatus)
|
||||
|
||||
# if we change location clear the db of episodes, change it, write to db, and rescan
|
||||
if os.path.normpath(showObj._location) != os.path.normpath(location):
|
||||
@ -2841,6 +2841,9 @@ class Manage(Home, WebRoot):
|
||||
paused_all_same = True
|
||||
last_paused = None
|
||||
|
||||
default_ep_status_all_same = True
|
||||
last_default_ep_status = None
|
||||
|
||||
anime_all_same = True
|
||||
last_anime = None
|
||||
|
||||
@ -2882,6 +2885,12 @@ class Manage(Home, WebRoot):
|
||||
else:
|
||||
last_paused = curShow.paused
|
||||
|
||||
if default_ep_status_all_same:
|
||||
if last_default_ep_status not in (None, curShow.default_ep_status):
|
||||
default_ep_status_all_same = False
|
||||
else:
|
||||
last_default_ep_status = curShow.default_ep_status
|
||||
|
||||
if anime_all_same:
|
||||
# if we had a value already and this value is different then they're not all the same
|
||||
if last_anime not in (None, curShow.is_anime):
|
||||
@ -2927,6 +2936,7 @@ class Manage(Home, WebRoot):
|
||||
|
||||
t.showList = toEdit
|
||||
t.archive_firstmatch_value = last_archive_firstmatch if archive_firstmatch_all_same else None
|
||||
t.default_ep_status_value = last_default_ep_status if default_ep_status_all_same else None
|
||||
t.paused_value = last_paused if paused_all_same else None
|
||||
t.anime_value = last_anime if anime_all_same else None
|
||||
t.flatten_folders_value = last_flatten_folders if flatten_folders_all_same else None
|
||||
@ -2940,9 +2950,8 @@ class Manage(Home, WebRoot):
|
||||
return t.respond()
|
||||
|
||||
|
||||
def massEditSubmit(self, archive_firstmatch=None, paused=None, anime=None, sports=None, scene=None,
|
||||
flatten_folders=None,
|
||||
quality_preset=False,
|
||||
def massEditSubmit(self, archive_firstmatch=None, paused=None, default_ep_status=None,
|
||||
anime=None, sports=None, scene=None, flatten_folders=None, quality_preset=False,
|
||||
subtitles=None, air_by_date=None, anyQualities=[], bestQualities=[], toEdit=None, *args,
|
||||
**kwargs):
|
||||
|
||||
@ -2983,6 +2992,11 @@ class Manage(Home, WebRoot):
|
||||
new_paused = True if paused == 'enable' else False
|
||||
new_paused = 'on' if new_paused else 'off'
|
||||
|
||||
if default_ep_status == 'keep':
|
||||
new_default_ep_status = showObj.default_ep_status
|
||||
else:
|
||||
new_default_ep_status = default_ep_status
|
||||
|
||||
if anime == 'keep':
|
||||
new_anime = showObj.anime
|
||||
else:
|
||||
@ -3027,6 +3041,7 @@ class Manage(Home, WebRoot):
|
||||
|
||||
curErrors += self.editShow(curShow, new_show_dir, anyQualities,
|
||||
bestQualities, exceptions_list,
|
||||
defaultEpStatus=new_default_ep_status,
|
||||
archive_firstmatch=new_archive_firstmatch,
|
||||
flatten_folders=new_flatten_folders,
|
||||
paused=new_paused, sports=new_sports,
|
||||
@ -4425,7 +4440,7 @@ class ConfigNotifications(Config):
|
||||
sickbeard.GROWL_NOTIFY_ONSUBTITLEDOWNLOAD = config.checkbox_to_value(growl_notify_onsubtitledownload)
|
||||
sickbeard.GROWL_HOST = config.clean_host(growl_host, default_port=23053)
|
||||
sickbeard.GROWL_PASSWORD = growl_password
|
||||
|
||||
|
||||
sickbeard.USE_FREEMOBILE = config.checkbox_to_value(use_freemobile)
|
||||
sickbeard.FREEMOBILE_NOTIFY_ONSNATCH = config.checkbox_to_value(freemobile_notify_onsnatch)
|
||||
sickbeard.FREEMOBILE_NOTIFY_ONDOWNLOAD = config.checkbox_to_value(freemobile_notify_ondownload)
|
||||
|
Loading…
Reference in New Issue
Block a user