1
0
mirror of https://github.com/fHDHR/fHDHR_NextPVR.git synced 2025-12-06 15:16:58 -05:00

More SSDP Error handling

This commit is contained in:
deathbybandaid 2020-11-09 15:43:36 -05:00
parent b0e5de9d43
commit 407a2ef6f2

View File

@ -137,9 +137,12 @@ class SSDPServer():
elif cmd[0] == 'NOTIFY' and cmd[1] == '*': elif cmd[0] == 'NOTIFY' and cmd[1] == '*':
# SSDP presence # SSDP presence
self.logger.debug("NOTIFY data: {}".format(headers)) self.logger.debug("NOTIFY data: {}".format(headers))
if headers["server"].startswith("fHDHR"): try:
if headers["location"] != self.location: if headers["server"].startswith("fHDHR"):
self.detect_method.set(headers["location"].split("/device.xml")[0]) if headers["location"] != self.location:
self.detect_method.set(headers["location"].split("/device.xml")[0])
except KeyError:
return
else: else:
self.logger.debug('Unknown SSDP command %s %s' % (cmd[0], cmd[1])) self.logger.debug('Unknown SSDP command %s %s' % (cmd[0], cmd[1]))