mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-16 08:35:32 +01:00
made requested fixes
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -80,12 +80,6 @@
|
||||
<input type="text" name="https_key" value="${config['https_key']}" size="30">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row checkbox">
|
||||
<input type="checkbox" name="verify_ssl_cert" id="verify_ssl_cert" value="1" ${config['verify_ssl_cert']} />
|
||||
<label title="Verify SSL Certificates (Disable this for broken SSL installs (Like QNAP)">
|
||||
Verify SSL
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -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', ''),
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user