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

Merge pull request #46 from deathbybandaid/dev

More SSDP Error handling
This commit is contained in:
Deathbybandaid 2020-11-09 15:44:21 -05:00 committed by GitHub
commit 183bc46320
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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