mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-03 01:43:37 +00:00
Merge pull request #784 from djoole/sync-files-option
Added an option in Post Processing options do activated/deactivate postp...
This commit is contained in:
commit
37ef85e16c
4 changed files with 18 additions and 6 deletions
|
@ -112,6 +112,14 @@
|
|||
</label>
|
||||
</div>
|
||||
|
||||
<div class="field-pair">
|
||||
<input type="checkbox" name="postpone_if_sync_files" id="postpone_if_sync_files" #if $sickbeard.POSTPONE_IF_SYNC_FILES == True then "checked=\"checked\"" else ""# />
|
||||
<label class="clearfix" for="postpone_if_sync_files">
|
||||
<span class="component-title">Postpone post processing</span>
|
||||
<span class="component-desc">if !sync files are present in the TV download dir</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="field-pair">
|
||||
<input type="checkbox" name="nfo_rename" id="nfo_rename" #if $sickbeard.NFO_RENAME == True then "checked=\"checked\"" else ""# />
|
||||
<label class="clearfix" for="nfo_rename">
|
||||
|
|
|
@ -211,6 +211,7 @@ PROCESS_AUTOMATICALLY = False
|
|||
KEEP_PROCESSED_DIR = False
|
||||
PROCESS_METHOD = None
|
||||
MOVE_ASSOCIATED_FILES = False
|
||||
POSTPONE_IF_SYNC_FILES = True
|
||||
NFO_RENAME = True
|
||||
TV_DOWNLOAD_DIR = None
|
||||
UNPACK = False
|
||||
|
@ -478,7 +479,7 @@ def initialize(consoleLogging=True):
|
|||
USE_SYNOLOGYNOTIFIER, SYNOLOGYNOTIFIER_NOTIFY_ONSNATCH, SYNOLOGYNOTIFIER_NOTIFY_ONDOWNLOAD, SYNOLOGYNOTIFIER_NOTIFY_ONSUBTITLEDOWNLOAD, \
|
||||
USE_EMAIL, EMAIL_HOST, EMAIL_PORT, EMAIL_TLS, EMAIL_USER, EMAIL_PASSWORD, EMAIL_FROM, EMAIL_NOTIFY_ONSNATCH, EMAIL_NOTIFY_ONDOWNLOAD, EMAIL_NOTIFY_ONSUBTITLEDOWNLOAD, EMAIL_LIST, \
|
||||
USE_LISTVIEW, METADATA_XBMC, METADATA_XBMC_12PLUS, METADATA_MEDIABROWSER, METADATA_PS3, metadata_provider_dict, \
|
||||
NEWZBIN, NEWZBIN_USERNAME, NEWZBIN_PASSWORD, GIT_PATH, MOVE_ASSOCIATED_FILES, dailySearchScheduler, NFO_RENAME, \
|
||||
NEWZBIN, NEWZBIN_USERNAME, NEWZBIN_PASSWORD, GIT_PATH, MOVE_ASSOCIATED_FILES, POSTPONE_IF_SYNC_FILES, dailySearchScheduler, NFO_RENAME, \
|
||||
GUI_NAME, HOME_LAYOUT, HISTORY_LAYOUT, DISPLAY_SHOW_SPECIALS, COMING_EPS_LAYOUT, COMING_EPS_SORT, COMING_EPS_DISPLAY_PAUSED, COMING_EPS_MISSED_RANGE, FUZZY_DATING, TRIM_ZERO, DATE_PRESET, TIME_PRESET, TIME_PRESET_W_SECONDS, \
|
||||
METADATA_WDTV, METADATA_TIVO, METADATA_MEDE8ER, IGNORE_WORDS, CALENDAR_UNPROTECTED, CREATE_MISSING_SHOW_DIRS, \
|
||||
ADD_SHOWS_WO_DIR, USE_SUBTITLES, SUBTITLES_LANGUAGES, SUBTITLES_DIR, SUBTITLES_SERVICES_LIST, SUBTITLES_SERVICES_ENABLED, SUBTITLES_HISTORY, SUBTITLES_FINDER_FREQUENCY, subtitlesFinderScheduler, \
|
||||
|
@ -677,6 +678,7 @@ def initialize(consoleLogging=True):
|
|||
KEEP_PROCESSED_DIR = bool(check_setting_int(CFG, 'General', 'keep_processed_dir', 1))
|
||||
PROCESS_METHOD = check_setting_str(CFG, 'General', 'process_method', 'copy' if KEEP_PROCESSED_DIR else 'move')
|
||||
MOVE_ASSOCIATED_FILES = bool(check_setting_int(CFG, 'General', 'move_associated_files', 0))
|
||||
POSTPONE_IF_SYNC_FILES = bool(check_setting_int(CFG, 'General', 'postpone_if_sync_files', 0))
|
||||
NFO_RENAME = bool(check_setting_int(CFG, 'General', 'nfo_rename', 1))
|
||||
CREATE_MISSING_SHOW_DIRS = bool(check_setting_int(CFG, 'General', 'create_missing_show_dirs', 0))
|
||||
ADD_SHOWS_WO_DIR = bool(check_setting_int(CFG, 'General', 'add_shows_wo_dir', 0))
|
||||
|
@ -1405,6 +1407,7 @@ def save_config():
|
|||
new_config['General']['keep_processed_dir'] = int(KEEP_PROCESSED_DIR)
|
||||
new_config['General']['process_method'] = PROCESS_METHOD
|
||||
new_config['General']['move_associated_files'] = int(MOVE_ASSOCIATED_FILES)
|
||||
new_config['General']['postpone_if_sync_files'] = int (POSTPONE_IF_SYNC_FILES)
|
||||
new_config['General']['nfo_rename'] = int(NFO_RENAME)
|
||||
new_config['General']['process_automatically'] = int(PROCESS_AUTOMATICALLY)
|
||||
new_config['General']['unpack'] = int(UNPACK)
|
||||
|
|
|
@ -140,8 +140,8 @@ def processDir(dirName, nzbName=None, process_method=None, force=False, is_prior
|
|||
|
||||
SyncFiles = filter(helpers.isSyncFile, files)
|
||||
|
||||
# Don't post process if files are still being synced
|
||||
if SyncFiles:
|
||||
# Don't post process if files are still being synced and option is activated
|
||||
if SyncFiles and sickbeard.POSTPONE_IF_SYNC_FILES:
|
||||
returnStr += logHelper(u"Found temporary sync files, skipping post processing", logger.ERROR)
|
||||
return returnStr
|
||||
|
||||
|
@ -188,8 +188,8 @@ def processDir(dirName, nzbName=None, process_method=None, force=False, is_prior
|
|||
|
||||
SyncFiles = filter(helpers.isSyncFile, fileList)
|
||||
|
||||
# Don't post process if files are still being synced
|
||||
if SyncFiles:
|
||||
# Don't post process if files are still being synced and option is activated
|
||||
if SyncFiles and sickbeard.POSTPONE_IF_SYNC_FILES:
|
||||
returnStr += logHelper(u"Found temporary sync files, skipping post processing", logger.ERROR)
|
||||
return returnStr
|
||||
|
||||
|
|
|
@ -1701,7 +1701,7 @@ class ConfigPostProcessing(MainHandler):
|
|||
wdtv_data=None, tivo_data=None, mede8er_data=None,
|
||||
keep_processed_dir=None, process_method=None, process_automatically=None,
|
||||
rename_episodes=None, airdate_episodes=None, unpack=None,
|
||||
move_associated_files=None, nfo_rename=None, tv_download_dir=None, naming_custom_abd=None,
|
||||
move_associated_files=None, postpone_if_sync_files=None, nfo_rename=None, tv_download_dir=None, naming_custom_abd=None,
|
||||
naming_anime=None,
|
||||
naming_abd_pattern=None, naming_strip_year=None, use_failed_downloads=None,
|
||||
delete_failed=None, extra_scripts=None, skip_removed_files=None,
|
||||
|
@ -1735,6 +1735,7 @@ class ConfigPostProcessing(MainHandler):
|
|||
sickbeard.RENAME_EPISODES = config.checkbox_to_value(rename_episodes)
|
||||
sickbeard.AIRDATE_EPISODES = config.checkbox_to_value(airdate_episodes)
|
||||
sickbeard.MOVE_ASSOCIATED_FILES = config.checkbox_to_value(move_associated_files)
|
||||
sickbeard.POSTPONE_IF_SYNC_FILES = config.checkbox_to_value(postpone_if_sync_files)
|
||||
sickbeard.NAMING_CUSTOM_ABD = config.checkbox_to_value(naming_custom_abd)
|
||||
sickbeard.NAMING_CUSTOM_SPORTS = config.checkbox_to_value(naming_custom_sports)
|
||||
sickbeard.NAMING_STRIP_YEAR = config.checkbox_to_value(naming_strip_year)
|
||||
|
|
Loading…
Reference in a new issue