Commit 1a61bc46 authored by echel0n's avatar echel0n
Browse files

Release v9.1.67

parent 5d18ffbb
# Changelog # Changelog
- * 07c1b0f - 2017-11-08: Fixed issues with verifying torrent metadata - * 7a65325 - 2017-11-08: Release v9.1.67
- * 5d18ffb - 2017-11-08: Fixed issues with verifying torrent metadata
- * 53aa1b8 - 2017-11-08: Updated bt cache urls and method for verifying data from them - * 53aa1b8 - 2017-11-08: Updated bt cache urls and method for verifying data from them
- * a6240ce - 2017-11-08: Misc typo corrections brought over from previous code refactoring - * a6240ce - 2017-11-08: Misc typo corrections brought over from previous code refactoring
- * d21a0b7 - 2017-11-08: Fixed search issues for HDTorrents provider - * d21a0b7 - 2017-11-08: Fixed search issues for HDTorrents provider
......
...@@ -85,16 +85,16 @@ class Config(object): ...@@ -85,16 +85,16 @@ class Config(object):
self.git_path = "" self.git_path = ""
self.git_autoissues = False self.git_autoissues = False
self.git_newver = False self.git_newver = False
self.changes_url = 'https://git.sickrage.ca/SiCKRAGE/sickrage/raw/master/changelog.md' self.changelog_url = 'https://cdn.sickrage.ca/changelog/?q={branch}'
self.socket_timeout = 30 self.socket_timeout = 30
self.web_host = get_lan_ip() self.web_host = ""
self.web_port = 8081 self.web_port = 8081
self.web_log = False self.web_log = False
self.web_root = "" self.web_root = ""
self.web_username = "" self.web_username = ""
self.web_password = "" self.web_password = ""
self.web_ipv6 = False self.web_ipv6 = False
self.web_cookie_secret = generateCookieSecret() self.web_cookie_secret = ""
self.web_use_gzip = True self.web_use_gzip = True
self.handle_reverse_proxy = False self.handle_reverse_proxy = False
self.proxy_setting = "" self.proxy_setting = ""
...@@ -760,7 +760,7 @@ class Config(object): ...@@ -760,7 +760,7 @@ class Config(object):
'naming_anime_pattern': 'Season %0S/%SN - S%0SE%0E - %EN', 'naming_anime_pattern': 'Season %0S/%SN - S%0SE%0E - %EN',
'naming_custom_anime': False, 'naming_custom_anime': False,
'randomize_providers': False, 'randomize_providers': False,
'web_host': '192.168.1.203', 'web_host': get_lan_ip(),
'config_version': 11, 'config_version': 11,
'process_automatically': False, 'process_automatically': False,
'git_path': 'git', 'git_path': 'git',
......
...@@ -824,9 +824,9 @@ def create_https_certificates(ssl_cert, ssl_key): ...@@ -824,9 +824,9 @@ def create_https_certificates(ssl_cert, ssl_key):
def get_lan_ip(): def get_lan_ip():
"""Returns IP of system""" """Return IP of system."""
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80)) s.connect(('8.8.8.8', 1))
return s.getsockname()[0] return s.getsockname()[0]
......
...@@ -358,6 +358,20 @@ class GitUpdateManager(UpdateManager): ...@@ -358,6 +358,20 @@ class GitUpdateManager(UpdateManager):
def get_newest_version(self): def get_newest_version(self):
return self._check_for_new_version() or self.version return self._check_for_new_version() or self.version
@property
def current_branch(self):
branch, __, exit_status = self._git_cmd(self._git_path, 'rev-parse --abbrev-ref HEAD')
return ("", branch)[exit_status == 0 and branch is not None]
@property
def remote_branches(self):
branches, __, exit_status = self._git_cmd(self._git_path,
'ls-remote --heads {}'.format(sickrage.app.config.git_remote))
if exit_status == 0 and branches:
return re.findall(r'refs/heads/(.*)', branches)
return []
def _find_installed_version(self): def _find_installed_version(self):
""" """
Attempts to find the currently installed version of SiCKRAGE. Attempts to find the currently installed version of SiCKRAGE.
...@@ -487,20 +501,6 @@ class GitUpdateManager(UpdateManager): ...@@ -487,20 +501,6 @@ class GitUpdateManager(UpdateManager):
self._git_cmd(self._git_path, 'remote set-url {} {}'.format(sickrage.app.config.git_remote, self._git_cmd(self._git_path, 'remote set-url {} {}'.format(sickrage.app.config.git_remote,
sickrage.app.config.git_remote_url)) sickrage.app.config.git_remote_url))
@property
def current_branch(self):
branch, __, exit_status = self._git_cmd(self._git_path, 'rev-parse --abbrev-ref HEAD')
return ("", branch)[exit_status == 0 and branch is not None]
@property
def remote_branches(self):
branches, __, exit_status = self._git_cmd(self._git_path,
'ls-remote --heads {}'.format(sickrage.app.config.git_remote))
if exit_status == 0 and branches:
return re.findall(r'refs/heads/(.*)', branches)
return []
class SourceUpdateManager(UpdateManager): class SourceUpdateManager(UpdateManager):
def __init__(self): def __init__(self):
...@@ -514,6 +514,10 @@ class SourceUpdateManager(UpdateManager): ...@@ -514,6 +514,10 @@ class SourceUpdateManager(UpdateManager):
def get_newest_version(self): def get_newest_version(self):
return self._check_for_new_version() or self.version return self._check_for_new_version() or self.version
@property
def current_branch(self):
return 'master'
@staticmethod @staticmethod
def _find_installed_version(): def _find_installed_version():
with io.open(os.path.join(sickrage.PROG_DIR, 'version.txt')) as f: with io.open(os.path.join(sickrage.PROG_DIR, 'version.txt')) as f:
...@@ -652,6 +656,10 @@ class PipUpdateManager(UpdateManager): ...@@ -652,6 +656,10 @@ class PipUpdateManager(UpdateManager):
def get_newest_version(self): def get_newest_version(self):
return self._check_for_new_version() or self.version return self._check_for_new_version() or self.version
@property
def current_branch(self):
return 'master'
def _find_installed_version(self): def _find_installed_version(self):
out, __, exit_status = self._pip_cmd(self._pip_path, 'show sickrage') out, __, exit_status = self._pip_cmd(self._pip_path, 'show sickrage')
if exit_status == 0: if exit_status == 0:
......
...@@ -2264,12 +2264,13 @@ class changelog(WebHandler): ...@@ -2264,12 +2264,13 @@ class changelog(WebHandler):
super(changelog, self).__init__(*args, **kwargs) super(changelog, self).__init__(*args, **kwargs)
def index(self): def index(self):
url = sickrage.app.config.changelog_url.format(branch=sickrage.app.version_updater.branch)
try: try:
changes = sickrage.app.wsession.get(sickrage.app.config.changes_url).text changes = sickrage.app.wsession.get(url).text
except Exception: except Exception:
sickrage.app.log.debug('Could not load changes from repo, giving a link!') sickrage.app.log.debug('Could not load changes from repo, giving a link!')
changes = _('Could not load changes from the repo. [Click here for CHANGES.md]({})').format( changes = _('Could not load changes from the repo. [Click here for CHANGES.md]({})').format(url)
sickrage.app.config.changes_url)
data = markdown2.markdown( data = markdown2.markdown(
changes if changes else _("The was a problem connecting to github, please refresh and try again"), changes if changes else _("The was a problem connecting to github, please refresh and try again"),
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment