From 08854942aa363ab08f5edc6b8f95696e444412d9 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Mon, 6 Feb 2017 13:43:06 +0000 Subject: [PATCH] Change add IPv4 config option when enabling IPv6. --- CHANGES.md | 1 + SickBeard.py | 8 +++----- gui/slick/interfaces/default/config_general.tmpl | 12 +++++++++++- sickbeard/__init__.py | 5 ++++- sickbeard/webserve.py | 3 ++- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 0bbaec9f..4ac87d81 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -43,6 +43,7 @@ * Update jQuery 1.8.3 to 2.2.4 * Add one time run to start up that deletes troublemaking compiled files * Fix reload of homepage after restart in some browsers +* Change add IPv4 config option when enabling IPv6. [develop changelog] diff --git a/SickBeard.py b/SickBeard.py index 02af40da..e6d349ae 100755 --- a/SickBeard.py +++ b/SickBeard.py @@ -364,10 +364,7 @@ class SickGear(object): if sickbeard.WEB_HOST and sickbeard.WEB_HOST != '0.0.0.0': self.webhost = sickbeard.WEB_HOST else: - if sickbeard.WEB_IPV6: - self.webhost = '::' - else: - self.webhost = '0.0.0.0' + self.webhost = (('0.0.0.0', '::')[sickbeard.WEB_IPV6], '')[sickbeard.WEB_IPV64] # web server options self.web_options = { @@ -387,7 +384,8 @@ class SickGear(object): # start web server try: # used to check if existing SG instances have been started - sickbeard.helpers.wait_for_free_port(self.web_options['host'], self.web_options['port']) + sickbeard.helpers.wait_for_free_port( + sickbeard.WEB_IPV6 and '::1' or self.web_options['host'], self.web_options['port']) self.webserver = WebServer(self.web_options) self.webserver.start() diff --git a/gui/slick/interfaces/default/config_general.tmpl b/gui/slick/interfaces/default/config_general.tmpl index c32e5b3f..97abb763 100644 --- a/gui/slick/interfaces/default/config_general.tmpl +++ b/gui/slick/interfaces/default/config_general.tmpl @@ -541,11 +541,21 @@ +
+
+ +
+