1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Fix for webui becoming unresponsive when using SSL and possibly in other situations as well.

This commit is contained in:
echel0n 2014-07-23 23:36:44 -07:00
parent de5db9be64
commit e5ac585b6a
4 changed files with 9 additions and 10 deletions

View File

@ -332,8 +332,8 @@ class SickRage(object):
'password': sickbeard.WEB_PASSWORD,
'enable_https': sickbeard.ENABLE_HTTPS,
'handle_reverse_proxy': sickbeard.HANDLE_REVERSE_PROXY,
'https_cert': sickbeard.HTTPS_CERT,
'https_key': sickbeard.HTTPS_KEY,
'https_cert': os.path.join(sickbeard.PROG_DIR, sickbeard.HTTPS_CERT),
'https_key': os.path.join(sickbeard.PROG_DIR, sickbeard.HTTPS_KEY),
}
# start web server

View File

@ -807,13 +807,11 @@ def create_https_certificates(ssl_cert, ssl_key):
return True
if __name__ == '__main__':
import doctest
doctest.testmod()
def parse_json(data):
"""
Parse json data into a python object

View File

@ -275,14 +275,15 @@ class GenericMetadata():
def update_show_indexer_metadata(self, show_obj):
if self.show_metadata and show_obj and self._has_show_metadata(show_obj):
logger.log(u"Metadata provider " + self.name + " updating show indexer info metadata file for " + show_obj.name, logger.DEBUG)
logger.log(
u"Metadata provider " + self.name + " updating show indexer info metadata file for " + show_obj.name,
logger.DEBUG)
nfo_file_path = self.get_show_file_path(show_obj)
try:
with ek.ek(open, nfo_file_path, 'r') as xmlFileObj:
showXML = etree.ElementTree(file=xmlFileObj)
indexer = showXML.find('indexer')
indexerid = showXML.find('id')
@ -976,7 +977,8 @@ class GenericMetadata():
try:
search = tmdb.Search()
for show_name in set(allPossibleShowNames(show)):
for result in search.collection({'query': show_name})['results'] + search.tv({'query': show_name})['results']:
for result in search.collection({'query': show_name})['results'] + search.tv({'query': show_name})[
'results']:
if backdrop and result['backdrop_path']:
return "{0}{1}{2}".format(base_url, max_size, result['backdrop_path'])
elif poster and result['poster_path']:

View File

@ -123,11 +123,10 @@ class SRWebServer(threading.Thread):
def run(self):
if self.enable_https:
protocol = "https"
self.server = HTTPServer(self.app, no_keep_alive=True,
ssl_options={"certfile": self.https_cert, "keyfile": self.https_key})
self.server = HTTPServer(self.app, ssl_options={"certfile": self.https_cert, "keyfile": self.https_key})
else:
protocol = "http"
self.server = HTTPServer(self.app, no_keep_alive=True)
self.server = HTTPServer(self.app)
logger.log(u"Starting SickRage on " + protocol + "://" + str(self.options['host']) + ":" + str(
self.options['port']) + "/")