1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-10 11:25:05 -05:00

Add option to skip detection of removed files

Adds config option in Config > Postprocessing
This commit is contained in:
Nils Vogels 2014-05-18 00:14:31 +02:00
parent 55f27c4f40
commit 8c449e27d2
4 changed files with 30 additions and 18 deletions

View File

@ -82,7 +82,13 @@
<span class="component-desc">What method should be used to put file in the TV directory?</span> <span class="component-desc">What method should be used to put file in the TV directory?</span>
</label> </label>
</div> </div>
<div class="field-pair">
<input type="checkbox" name="skip_removed_files" id="skip_removed_files" #if $sickbeard.SKIP_REMOVED_FILES == True then "checked=\"checked\"" else ""# />
<label class="clearfix" for="skip_removed_files">
<span class="component-title">Skip Remove Detection</span>
<span class="component-desc">Skip detection of removed files, so they don't get set to ignored?<br /><b>NOTE:</b> This may mean SickRage misses renames as well</span>
</label>
</div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck clearfix"> <label class="nocheck clearfix">
<span class="component-title">Extra Scripts</span> <span class="component-title">Extra Scripts</span>

View File

@ -207,6 +207,7 @@ PROCESS_METHOD = None
MOVE_ASSOCIATED_FILES = False MOVE_ASSOCIATED_FILES = False
TV_DOWNLOAD_DIR = None TV_DOWNLOAD_DIR = None
UNPACK = False UNPACK = False
SKIP_REMOVED_FILES = False
NZBS = False NZBS = False
NZBS_UID = None NZBS_UID = None
@ -430,7 +431,7 @@ def initialize(consoleLogging=True):
XBMC_UPDATE_LIBRARY, XBMC_HOST, XBMC_USERNAME, XBMC_PASSWORD, BACKLOG_FREQUENCY, \ XBMC_UPDATE_LIBRARY, XBMC_HOST, XBMC_USERNAME, XBMC_PASSWORD, BACKLOG_FREQUENCY, \
USE_TRAKT, TRAKT_USERNAME, TRAKT_PASSWORD, TRAKT_API, TRAKT_REMOVE_WATCHLIST, TRAKT_USE_WATCHLIST, TRAKT_METHOD_ADD, TRAKT_START_PAUSED, traktWatchListCheckerSchedular, \ USE_TRAKT, TRAKT_USERNAME, TRAKT_PASSWORD, TRAKT_API, TRAKT_REMOVE_WATCHLIST, TRAKT_USE_WATCHLIST, TRAKT_METHOD_ADD, TRAKT_START_PAUSED, traktWatchListCheckerSchedular, \
USE_PLEX, PLEX_NOTIFY_ONSNATCH, PLEX_NOTIFY_ONDOWNLOAD, PLEX_NOTIFY_ONSUBTITLEDOWNLOAD, PLEX_UPDATE_LIBRARY, \ USE_PLEX, PLEX_NOTIFY_ONSNATCH, PLEX_NOTIFY_ONDOWNLOAD, PLEX_NOTIFY_ONSUBTITLEDOWNLOAD, PLEX_UPDATE_LIBRARY, \
PLEX_SERVER_HOST, PLEX_HOST, PLEX_USERNAME, PLEX_PASSWORD, DEFAULT_BACKLOG_FREQUENCY, MIN_BACKLOG_FREQUENCY, BACKLOG_STARTUP, \ PLEX_SERVER_HOST, PLEX_HOST, PLEX_USERNAME, PLEX_PASSWORD, DEFAULT_BACKLOG_FREQUENCY, MIN_BACKLOG_FREQUENCY, BACKLOG_STARTUP, SKIP_REMOVED_FILES, \
showUpdateScheduler, __INITIALIZED__, LAUNCH_BROWSER, UPDATE_SHOWS_ON_START, SORT_ARTICLE, showList, loadingShowList, \ showUpdateScheduler, __INITIALIZED__, LAUNCH_BROWSER, UPDATE_SHOWS_ON_START, SORT_ARTICLE, showList, loadingShowList, \
NEWZNAB_DATA, NZBS, NZBS_UID, NZBS_HASH, INDEXER_DEFAULT, USENET_RETENTION, TORRENT_DIR,\ NEWZNAB_DATA, NZBS, NZBS_UID, NZBS_HASH, INDEXER_DEFAULT, USENET_RETENTION, TORRENT_DIR,\
QUALITY_DEFAULT, FLATTEN_FOLDERS_DEFAULT, SUBTITLES_DEFAULT, STATUS_DEFAULT, DAILYSEARCH_STARTUP,\ QUALITY_DEFAULT, FLATTEN_FOLDERS_DEFAULT, SUBTITLES_DEFAULT, STATUS_DEFAULT, DAILYSEARCH_STARTUP,\
@ -604,6 +605,7 @@ def initialize(consoleLogging=True):
DAILYSEARCH_STARTUP = bool(check_setting_int(CFG, 'General', 'dailysearch_startup', 1)) DAILYSEARCH_STARTUP = bool(check_setting_int(CFG, 'General', 'dailysearch_startup', 1))
BACKLOG_STARTUP = bool(check_setting_int(CFG, 'General', 'backlog_startup', 1)) BACKLOG_STARTUP = bool(check_setting_int(CFG, 'General', 'backlog_startup', 1))
SKIP_REMOVED_FILES = bool(check_setting_int(CFG, 'General', 'skip_removed_files', 0))
USENET_RETENTION = check_setting_int(CFG, 'General', 'usenet_retention', 500) USENET_RETENTION = check_setting_int(CFG, 'General', 'usenet_retention', 500)
@ -1317,6 +1319,7 @@ def save_config():
new_config['General']['allow_high_priority'] = int(ALLOW_HIGH_PRIORITY) new_config['General']['allow_high_priority'] = int(ALLOW_HIGH_PRIORITY)
new_config['General']['dailysearch_startup'] = int(DAILYSEARCH_STARTUP) new_config['General']['dailysearch_startup'] = int(DAILYSEARCH_STARTUP)
new_config['General']['backlog_startup'] = int(BACKLOG_STARTUP) new_config['General']['backlog_startup'] = int(BACKLOG_STARTUP)
new_config['General']['skip_removed_files'] = int(SKIP_REMOVED_FILES)
new_config['General']['quality_default'] = int(QUALITY_DEFAULT) new_config['General']['quality_default'] = int(QUALITY_DEFAULT)
new_config['General']['status_default'] = int(STATUS_DEFAULT) new_config['General']['status_default'] = int(STATUS_DEFAULT)
new_config['General']['flatten_folders_default'] = int(FLATTEN_FOLDERS_DEFAULT) new_config['General']['flatten_folders_default'] = int(FLATTEN_FOLDERS_DEFAULT)

View File

@ -942,6 +942,8 @@ class TVShow(object):
if not ek.ek(os.path.isfile, curLoc) or not os.path.normpath(curLoc).startswith( if not ek.ek(os.path.isfile, curLoc) or not os.path.normpath(curLoc).startswith(
os.path.normpath(self.location)): os.path.normpath(self.location)):
# check if downloaded files still exist, update our data if this has changed
if not SKIP_REMOVED_FILES:
with curEp.lock: with curEp.lock:
# if it used to have a file associated with it and it doesn't anymore then set it to IGNORED # 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: if curEp.location and curEp.status in Quality.DOWNLOADED:

View File

@ -1120,6 +1120,7 @@ class ConfigSearch:
sickbeard.DAILYSEARCH_STARTUP = config.checkbox_to_value(dailysearch_startup) sickbeard.DAILYSEARCH_STARTUP = config.checkbox_to_value(dailysearch_startup)
sickbeard.BACKLOG_STARTUP = config.checkbox_to_value(backlog_startup) sickbeard.BACKLOG_STARTUP = config.checkbox_to_value(backlog_startup)
sickbeard.SKIP_REMOVED_FILES = config.checkbox_to_value(skip_removed_files)
sickbeard.SAB_USERNAME = sab_username sickbeard.SAB_USERNAME = sab_username
sickbeard.SAB_PASSWORD = sab_password sickbeard.SAB_PASSWORD = sab_password
@ -1173,7 +1174,7 @@ class ConfigPostProcessing:
rename_episodes=None, airdate_episodes=None, unpack=None, rename_episodes=None, airdate_episodes=None, unpack=None,
move_associated_files=None, tv_download_dir=None, naming_custom_abd=None, move_associated_files=None, tv_download_dir=None, naming_custom_abd=None,
naming_abd_pattern=None, naming_strip_year=None, use_failed_downloads=None, naming_abd_pattern=None, naming_strip_year=None, use_failed_downloads=None,
delete_failed=None, extra_scripts=None, delete_failed=None, extra_scripts=None, skip_removed_files=None,
naming_custom_sports=None, naming_sports_pattern=None): naming_custom_sports=None, naming_sports_pattern=None):
results = [] results = []