mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-04 18:33:38 +00:00
Merge commit '5e95c5bc0294d324ae494e88ad708648b912588b'
Fixing versionchecker, backlog and managesearches issue
This commit is contained in:
commit
82abad6f19
5 changed files with 19 additions and 8 deletions
|
@ -41,6 +41,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content_use_xbmc">
|
<div id="content_use_xbmc">
|
||||||
|
<div class="field-pair">
|
||||||
|
<input type="checkbox" name="xbmc_always_on" id="xbmc_always_on" #if $sickbeard.XBMC_ALWAYS_ON then "checked=\"checked\"" else ""# />
|
||||||
|
<label class="clearfix" for="xbmc_always_on">
|
||||||
|
<span class="component-title">Always On</span>
|
||||||
|
<span class="component-desc">Log errors when unreachable?</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div class="field-pair">
|
<div class="field-pair">
|
||||||
<input type="checkbox" name="xbmc_notify_onsnatch" id="xbmc_notify_onsnatch" #if $sickbeard.XBMC_NOTIFY_ONSNATCH then "checked=\"checked\"" else ""# />
|
<input type="checkbox" name="xbmc_notify_onsnatch" id="xbmc_notify_onsnatch" #if $sickbeard.XBMC_NOTIFY_ONSNATCH then "checked=\"checked\"" else ""# />
|
||||||
<label class="clearfix" for="xbmc_notify_onsnatch">
|
<label class="clearfix" for="xbmc_notify_onsnatch">
|
||||||
|
|
|
@ -292,6 +292,7 @@ TORRENT_HIGH_BANDWIDTH = False
|
||||||
TORRENT_LABEL = ''
|
TORRENT_LABEL = ''
|
||||||
|
|
||||||
USE_XBMC = False
|
USE_XBMC = False
|
||||||
|
XBMC_ALWAYS_ON = True
|
||||||
XBMC_NOTIFY_ONSNATCH = False
|
XBMC_NOTIFY_ONSNATCH = False
|
||||||
XBMC_NOTIFY_ONDOWNLOAD = False
|
XBMC_NOTIFY_ONDOWNLOAD = False
|
||||||
XBMC_NOTIFY_ONSUBTITLEDOWNLOAD = False
|
XBMC_NOTIFY_ONSUBTITLEDOWNLOAD = False
|
||||||
|
@ -475,7 +476,7 @@ def initialize(consoleLogging=True):
|
||||||
SAB_USERNAME, SAB_PASSWORD, SAB_APIKEY, SAB_CATEGORY, SAB_HOST, \
|
SAB_USERNAME, SAB_PASSWORD, SAB_APIKEY, SAB_CATEGORY, SAB_HOST, \
|
||||||
NZBGET_USERNAME, NZBGET_PASSWORD, NZBGET_CATEGORY, NZBGET_HOST, NZBGET_USE_HTTPS, currentSearchScheduler, backlogSearchScheduler, \
|
NZBGET_USERNAME, NZBGET_PASSWORD, NZBGET_CATEGORY, NZBGET_HOST, NZBGET_USE_HTTPS, currentSearchScheduler, backlogSearchScheduler, \
|
||||||
TORRENT_USERNAME, TORRENT_PASSWORD, TORRENT_HOST, TORRENT_PATH, TORRENT_RATIO, TORRENT_SEED_TIME, TORRENT_PAUSED, TORRENT_HIGH_BANDWIDTH, TORRENT_LABEL, \
|
TORRENT_USERNAME, TORRENT_PASSWORD, TORRENT_HOST, TORRENT_PATH, TORRENT_RATIO, TORRENT_SEED_TIME, TORRENT_PAUSED, TORRENT_HIGH_BANDWIDTH, TORRENT_LABEL, \
|
||||||
USE_XBMC, XBMC_NOTIFY_ONSNATCH, XBMC_NOTIFY_ONDOWNLOAD, XBMC_NOTIFY_ONSUBTITLEDOWNLOAD, XBMC_UPDATE_FULL, XBMC_UPDATE_ONLYFIRST, \
|
USE_XBMC, XBMC_ALWAYS_ON, XBMC_NOTIFY_ONSNATCH, XBMC_NOTIFY_ONDOWNLOAD, XBMC_NOTIFY_ONSUBTITLEDOWNLOAD, XBMC_UPDATE_FULL, XBMC_UPDATE_ONLYFIRST, \
|
||||||
XBMC_UPDATE_LIBRARY, XBMC_HOST, XBMC_USERNAME, XBMC_PASSWORD, \
|
XBMC_UPDATE_LIBRARY, XBMC_HOST, XBMC_USERNAME, XBMC_PASSWORD, \
|
||||||
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, \
|
||||||
|
@ -781,6 +782,7 @@ def initialize(consoleLogging=True):
|
||||||
TORRENT_LABEL = check_setting_str(CFG, 'TORRENT', 'torrent_label', '')
|
TORRENT_LABEL = check_setting_str(CFG, 'TORRENT', 'torrent_label', '')
|
||||||
|
|
||||||
USE_XBMC = bool(check_setting_int(CFG, 'XBMC', 'use_xbmc', 0))
|
USE_XBMC = bool(check_setting_int(CFG, 'XBMC', 'use_xbmc', 0))
|
||||||
|
XBMC_ALWAYS_ON = bool(check_setting_int(CFG, 'XBMC', 'xbmc_always_on', 1))
|
||||||
XBMC_NOTIFY_ONSNATCH = bool(check_setting_int(CFG, 'XBMC', 'xbmc_notify_onsnatch', 0))
|
XBMC_NOTIFY_ONSNATCH = bool(check_setting_int(CFG, 'XBMC', 'xbmc_notify_onsnatch', 0))
|
||||||
XBMC_NOTIFY_ONDOWNLOAD = bool(check_setting_int(CFG, 'XBMC', 'xbmc_notify_ondownload', 0))
|
XBMC_NOTIFY_ONDOWNLOAD = bool(check_setting_int(CFG, 'XBMC', 'xbmc_notify_ondownload', 0))
|
||||||
XBMC_NOTIFY_ONSUBTITLEDOWNLOAD = bool(check_setting_int(CFG, 'XBMC', 'xbmc_notify_onsubtitledownload', 0))
|
XBMC_NOTIFY_ONSUBTITLEDOWNLOAD = bool(check_setting_int(CFG, 'XBMC', 'xbmc_notify_onsubtitledownload', 0))
|
||||||
|
@ -1526,6 +1528,7 @@ def save_config():
|
||||||
|
|
||||||
new_config['XBMC'] = {}
|
new_config['XBMC'] = {}
|
||||||
new_config['XBMC']['use_xbmc'] = int(USE_XBMC)
|
new_config['XBMC']['use_xbmc'] = int(USE_XBMC)
|
||||||
|
new_config['XBMC']['xbmc_always_on'] = int(XBMC_ALWAYS_ON)
|
||||||
new_config['XBMC']['xbmc_notify_onsnatch'] = int(XBMC_NOTIFY_ONSNATCH)
|
new_config['XBMC']['xbmc_notify_onsnatch'] = int(XBMC_NOTIFY_ONSNATCH)
|
||||||
new_config['XBMC']['xbmc_notify_ondownload'] = int(XBMC_NOTIFY_ONDOWNLOAD)
|
new_config['XBMC']['xbmc_notify_ondownload'] = int(XBMC_NOTIFY_ONDOWNLOAD)
|
||||||
new_config['XBMC']['xbmc_notify_onsubtitledownload'] = int(XBMC_NOTIFY_ONSUBTITLEDOWNLOAD)
|
new_config['XBMC']['xbmc_notify_onsubtitledownload'] = int(XBMC_NOTIFY_ONSUBTITLEDOWNLOAD)
|
||||||
|
|
|
@ -146,8 +146,8 @@ class XBMCNotifier:
|
||||||
if notifyResult:
|
if notifyResult:
|
||||||
result += curHost + ':' + notifyResult["result"].decode(sickbeard.SYS_ENCODING)
|
result += curHost + ':' + notifyResult["result"].decode(sickbeard.SYS_ENCODING)
|
||||||
else:
|
else:
|
||||||
logger.log(u"Failed to detect XBMC version for '" + curHost + "', check configuration and try again.",
|
if sickbeard.XBMC_ALWAYS_ON or force:
|
||||||
logger.ERROR)
|
logger.log(u"Failed to detect XBMC version for '" + curHost + "', check configuration and try again.", logger.ERROR)
|
||||||
result += curHost + ':False'
|
result += curHost + ':False'
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
@ -542,8 +542,8 @@ class XBMCNotifier:
|
||||||
logger.DEBUG)
|
logger.DEBUG)
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
logger.log(u"Failed to detect XBMC version for '" + host + "', check configuration and try again.",
|
if sickbeard.XBMC_ALWAYS_ON:
|
||||||
logger.ERROR)
|
logger.log(u"Failed to detect XBMC version for '" + curHost + "', check configuration and try again.", logger.ERROR)
|
||||||
result = result + 1
|
result = result + 1
|
||||||
|
|
||||||
# needed for the 'update xbmc' submenu command
|
# needed for the 'update xbmc' submenu command
|
||||||
|
|
|
@ -142,7 +142,7 @@ class SearchQueue(generic_queue.GenericQueue):
|
||||||
return self.min_priority >= generic_queue.QueuePriorities.NORMAL
|
return self.min_priority >= generic_queue.QueuePriorities.NORMAL
|
||||||
|
|
||||||
def is_backlog_in_progress(self):
|
def is_backlog_in_progress(self):
|
||||||
for cur_item in self.queue + [self.currentItem]:
|
for cur_item in self.queue.queue + [self.currentItem]:
|
||||||
if isinstance(cur_item, BacklogQueueItem):
|
if isinstance(cur_item, BacklogQueueItem):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -1650,7 +1650,7 @@ class ConfigNotifications:
|
||||||
return _munge(t)
|
return _munge(t)
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def saveNotifications(self, use_xbmc=None, xbmc_notify_onsnatch=None, xbmc_notify_ondownload=None,
|
def saveNotifications(self, use_xbmc=None, xbmc_always_on=None, xbmc_notify_onsnatch=None, xbmc_notify_ondownload=None,
|
||||||
xbmc_notify_onsubtitledownload=None, xbmc_update_onlyfirst=None,
|
xbmc_notify_onsubtitledownload=None, xbmc_update_onlyfirst=None,
|
||||||
xbmc_update_library=None, xbmc_update_full=None, xbmc_host=None, xbmc_username=None,
|
xbmc_update_library=None, xbmc_update_full=None, xbmc_host=None, xbmc_username=None,
|
||||||
xbmc_password=None,
|
xbmc_password=None,
|
||||||
|
@ -1696,6 +1696,7 @@ class ConfigNotifications:
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
sickbeard.USE_XBMC = config.checkbox_to_value(use_xbmc)
|
sickbeard.USE_XBMC = config.checkbox_to_value(use_xbmc)
|
||||||
|
sickbeard.XBMC_ALWAYS_ON = config.checkbox_to_value(xbmc_always_on)
|
||||||
sickbeard.XBMC_NOTIFY_ONSNATCH = config.checkbox_to_value(xbmc_notify_onsnatch)
|
sickbeard.XBMC_NOTIFY_ONSNATCH = config.checkbox_to_value(xbmc_notify_onsnatch)
|
||||||
sickbeard.XBMC_NOTIFY_ONDOWNLOAD = config.checkbox_to_value(xbmc_notify_ondownload)
|
sickbeard.XBMC_NOTIFY_ONDOWNLOAD = config.checkbox_to_value(xbmc_notify_ondownload)
|
||||||
sickbeard.XBMC_NOTIFY_ONSUBTITLEDOWNLOAD = config.checkbox_to_value(xbmc_notify_onsubtitledownload)
|
sickbeard.XBMC_NOTIFY_ONSUBTITLEDOWNLOAD = config.checkbox_to_value(xbmc_notify_onsubtitledownload)
|
||||||
|
|
Loading…
Reference in a new issue