1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 19:12:26 -05:00

Fixed issues with network timezone downloads crashing on a empty return.

Changed version checker url.
This commit is contained in:
echel0n 2014-12-12 08:54:37 -08:00
parent 3f29439ff3
commit 35af9acadb
3 changed files with 14 additions and 9 deletions

View File

@ -213,7 +213,7 @@
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="$sbRoot/images/menu/system18-2.png" class="navbaricon hidden-xs" /><b class="caret hidden-xs"></b><span class="visible-xs">System <b class="caret"></b></span></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="$sbRoot/images/menu/system18-2.png" class="navbaricon hidden-xs" /><b class="caret hidden-xs"></b><span class="visible-xs">System <b class="caret"></b></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="$sbRoot/manage/manageSearches/forceVersionCheck"><i class="menu-icon-update"></i>&nbsp;Force Version Check</a></li> <li><a href="$sbRoot/home/forceVersionCheck"><i class="menu-icon-update"></i>&nbsp;Force Version Check</a></li>
<li><a href="$sbRoot/home/restart/?pid=$sbPID" class="confirm restart"><i class="menu-icon-restart"></i>&nbsp;Restart</a></li> <li><a href="$sbRoot/home/restart/?pid=$sbPID" class="confirm restart"><i class="menu-icon-restart"></i>&nbsp;Restart</a></li>
<li><a href="$sbRoot/home/shutdown/?pid=$sbPID" class="confirm shutdown"><i class="menu-icon-shutdown"></i>&nbsp;Shutdown</a></li> <li><a href="$sbRoot/home/shutdown/?pid=$sbPID" class="confirm shutdown"><i class="menu-icon-shutdown"></i>&nbsp;Shutdown</a></li>
<li><a href="$sbRoot/logout" class="confirm logout"><i class="menu-icon-shutdown"></i>&nbsp;Logout</a></li> <li><a href="$sbRoot/logout" class="confirm logout"><i class="menu-icon-shutdown"></i>&nbsp;Logout</a></li>

View File

@ -108,12 +108,14 @@ AUTO_UPDATE = False
NOTIFY_ON_UPDATE = False NOTIFY_ON_UPDATE = False
CUR_COMMIT_HASH = None CUR_COMMIT_HASH = None
BRANCH = '' BRANCH = ''
GIT_RESET = False
GIT_REMOTE = '' GIT_REMOTE = ''
GIT_REMOTE_URL = '' GIT_REMOTE_URL = ''
CUR_COMMIT_BRANCH = '' CUR_COMMIT_BRANCH = ''
GIT_ORG = 'SiCKRAGETV' GIT_ORG = 'SiCKRAGETV'
GIT_REPO = 'SickRage' GIT_REPO = 'SickRage'
GIT_PATH = None
INIT_LOCK = Lock() INIT_LOCK = Lock()
started = False started = False
@ -460,8 +462,6 @@ DELETE_FAILED = False
EXTRA_SCRIPTS = [] EXTRA_SCRIPTS = []
GIT_PATH = None
IGNORE_WORDS = "german,french,core2hd,dutch,swedish,reenc,MrLss" IGNORE_WORDS = "german,french,core2hd,dutch,swedish,reenc,MrLss"
REQUIRE_WORDS = "" REQUIRE_WORDS = ""
@ -481,7 +481,7 @@ def get_backlog_cycle_time():
def initialize(consoleLogging=True): def initialize(consoleLogging=True):
with INIT_LOCK: with INIT_LOCK:
global BRANCH, GIT_REMOTE, GIT_REMOTE_URL, CUR_COMMIT_HASH, CUR_COMMIT_BRANCH, ACTUAL_LOG_DIR, LOG_DIR, WEB_PORT, WEB_LOG, ENCRYPTION_VERSION, WEB_ROOT, WEB_USERNAME, WEB_PASSWORD, WEB_HOST, WEB_IPV6, USE_API, API_KEY, API_ROOT, ENABLE_HTTPS, HTTPS_CERT, HTTPS_KEY, \ global BRANCH, GIT_RESET, GIT_REMOTE, GIT_REMOTE_URL, CUR_COMMIT_HASH, CUR_COMMIT_BRANCH, ACTUAL_LOG_DIR, LOG_DIR, WEB_PORT, WEB_LOG, ENCRYPTION_VERSION, WEB_ROOT, WEB_USERNAME, WEB_PASSWORD, WEB_HOST, WEB_IPV6, USE_API, API_KEY, API_ROOT, ENABLE_HTTPS, HTTPS_CERT, HTTPS_KEY, \
HANDLE_REVERSE_PROXY, USE_NZBS, USE_TORRENTS, NZB_METHOD, NZB_DIR, DOWNLOAD_PROPERS, RANDOMIZE_PROVIDERS, CHECK_PROPERS_INTERVAL, ALLOW_HIGH_PRIORITY, TORRENT_METHOD, \ HANDLE_REVERSE_PROXY, USE_NZBS, USE_TORRENTS, NZB_METHOD, NZB_DIR, DOWNLOAD_PROPERS, RANDOMIZE_PROVIDERS, CHECK_PROPERS_INTERVAL, ALLOW_HIGH_PRIORITY, TORRENT_METHOD, \
SAB_USERNAME, SAB_PASSWORD, SAB_APIKEY, SAB_CATEGORY, SAB_CATEGORY_ANIME, SAB_HOST, \ SAB_USERNAME, SAB_PASSWORD, SAB_APIKEY, SAB_CATEGORY, SAB_CATEGORY_ANIME, SAB_HOST, \
NZBGET_USERNAME, NZBGET_PASSWORD, NZBGET_CATEGORY, NZBGET_CATEGORY_ANIME, NZBGET_PRIORITY, NZBGET_HOST, NZBGET_USE_HTTPS, backlogSearchScheduler, \ NZBGET_USERNAME, NZBGET_PASSWORD, NZBGET_CATEGORY, NZBGET_CATEGORY_ANIME, NZBGET_PRIORITY, NZBGET_HOST, NZBGET_USE_HTTPS, backlogSearchScheduler, \
@ -555,6 +555,10 @@ def initialize(consoleLogging=True):
except: except:
gh = None gh = None
# git reset on update
GIT_RESET = bool(check_setting_int(CFG, 'General', 'git_reset', 0))
# current git branch
BRANCH = check_setting_str(CFG, 'General', 'branch', '') BRANCH = check_setting_str(CFG, 'General', 'branch', '')
# git_remote # git_remote
@ -1397,6 +1401,7 @@ def save_config():
# For passwords you must include the word `password` in the item_name and add `helpers.encrypt(ITEM_NAME, ENCRYPTION_VERSION)` in save_config() # For passwords you must include the word `password` in the item_name and add `helpers.encrypt(ITEM_NAME, ENCRYPTION_VERSION)` in save_config()
new_config['General'] = {} new_config['General'] = {}
new_config['General']['git_reset'] = int(GIT_RESET)
new_config['General']['branch'] = BRANCH new_config['General']['branch'] = BRANCH
new_config['General']['git_remote'] = GIT_REMOTE new_config['General']['git_remote'] = GIT_REMOTE
new_config['General']['git_remote_url'] = GIT_REMOTE_URL new_config['General']['git_remote_url'] = GIT_REMOTE_URL

View File

@ -569,7 +569,7 @@ class GitUpdateManager(UpdateManager):
Calls git reset --hard to perform a hard reset. Returns a bool depending Calls git reset --hard to perform a hard reset. Returns a bool depending
on the call's success. on the call's success.
""" """
if sickbeard.GIT_RESET:
output, err, exit_status = self._run_git(self._git_path, 'reset --hard') # @UnusedVariable output, err, exit_status = self._run_git(self._git_path, 'reset --hard') # @UnusedVariable
if exit_status == 0: if exit_status == 0: