diff --git a/Headphones.py b/Headphones.py
index 713a628b..c4fa80d4 100755
--- a/Headphones.py
+++ b/Headphones.py
@@ -22,6 +22,11 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'lib/'))
from headphones import webstart, logger
+if sys.version_info >= (2, 7, 9):
+ import ssl
+ # pylint: disable=W0212
+ ssl._create_default_https_context = ssl._create_unverified_context
+
import locale
import time
import signal
@@ -177,16 +182,6 @@ def main():
"module to enable HTTPS. HTTPS will be disabled.")
headphones.CONFIG.ENABLE_HTTPS = False
- #This fix is put in place for systems with broken SSL (like QNAP)
- certificate_verification = headphones.CONFIG.VERIFY_SSL_CERT
- if not certificate_verification:
- try:
- import ssl
- ssl._create_default_https_context = ssl._create_unverified_context
- except:
- pass
- #==== end block (should be configurable at settings level)
-
# Try to start the server. Will exit here is address is already in use.
web_config = {
'http_port': http_port,
diff --git a/data/interfaces/default/config.html b/data/interfaces/default/config.html
index a6f3f6f6..5688ce6d 100644
--- a/data/interfaces/default/config.html
+++ b/data/interfaces/default/config.html
@@ -80,12 +80,6 @@
-
-
-
-
diff --git a/headphones/config.py b/headphones/config.py
index 9d48f471..97cc5e6c 100644
--- a/headphones/config.py
+++ b/headphones/config.py
@@ -253,7 +253,7 @@ _CONFIG_DEFINITIONS = {
'UTORRENT_LABEL': (str, 'uTorrent', ''),
'UTORRENT_PASSWORD': (str, 'uTorrent', ''),
'UTORRENT_USERNAME': (str, 'uTorrent', ''),
- 'VERIFY_SSL_CERT': (int, 'Advanced', 1),
+ 'VERIFY_SSL_CERT': (bool_int, 'Advanced', 1),
'WAIT_UNTIL_RELEASE_DATE' : (int, 'General', 0),
'WAFFLES': (int, 'Waffles', 0),
'WAFFLES_PASSKEY': (str, 'Waffles', ''),
diff --git a/headphones/webserve.py b/headphones/webserve.py
index b7f2874a..815c5e9f 100644
--- a/headphones/webserve.py
+++ b/headphones/webserve.py
@@ -1025,7 +1025,6 @@ class WebInterface(object):
"enable_https": checked(headphones.CONFIG.ENABLE_HTTPS),
"https_cert": headphones.CONFIG.HTTPS_CERT,
"https_key": headphones.CONFIG.HTTPS_KEY,
- "verify_ssl_cert": checked(headphones.CONFIG.VERIFY_SSL_CERT),
"api_enabled": checked(headphones.CONFIG.API_ENABLED),
"api_key": headphones.CONFIG.API_KEY,
"download_scan_interval": headphones.CONFIG.DOWNLOAD_SCAN_INTERVAL,
@@ -1287,7 +1286,7 @@ class WebInterface(object):
# Handle the variable config options. Note - keys with False values aren't getting passed
checked_configs = [
- "launch_browser", "enable_https", "verify_ssl_cert", "api_enabled", "use_blackhole", "headphones_indexer", "use_newznab", "newznab_enabled", "use_torznab", "torznab_enabled",
+ "launch_browser", "enable_https", "api_enabled", "use_blackhole", "headphones_indexer", "use_newznab", "newznab_enabled", "use_torznab", "torznab_enabled",
"use_nzbsorg", "use_omgwtfnzbs", "use_kat", "use_piratebay", "use_oldpiratebay", "use_mininova", "use_waffles", "use_rutracker",
"use_whatcd", "use_strike", "preferred_bitrate_allow_lossless", "detect_bitrate", "ignore_clean_releases", "freeze_db", "cue_split", "move_files",
"rename_files", "correct_metadata", "cleanup_files", "keep_nfo", "add_album_art", "embed_album_art", "embed_lyrics",
|