Fix Plex GDM discovery request
This commit is contained in:
parent
8ca9613d62
commit
8bdfcbabc8
1 changed files with 6 additions and 7 deletions
|
@ -162,16 +162,15 @@ class plexgdm(object):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
if "M-SEARCH * HTTP/1." in data:
|
if "M-SEARCH * HTTP/1." in data:
|
||||||
log.debug("Detected client discovery request from %s. "
|
log.debug('Detected client discovery request from %s. '
|
||||||
" Replying" % str(addr))
|
'Replying', addr)
|
||||||
|
message = f'HTTP/1.0 200 OK\n{self.client_data}'.encode()
|
||||||
try:
|
try:
|
||||||
update_sock.sendto("HTTP/1.0 200 OK\n%s"
|
update_sock.sendto(message, addr)
|
||||||
% self.client_data,
|
|
||||||
addr)
|
|
||||||
except Exception:
|
except Exception:
|
||||||
log.error("Unable to send client update message")
|
log.error("Unable to send client update message")
|
||||||
|
else:
|
||||||
log.debug("Sending registration data HTTP/1.0 200 OK")
|
log.debug("Sent registration data HTTP/1.0 200 OK")
|
||||||
self.client_registered = True
|
self.client_registered = True
|
||||||
app.APP.monitor.waitForAbort(0.5)
|
app.APP.monitor.waitForAbort(0.5)
|
||||||
log.info("Client Update loop stopped")
|
log.info("Client Update loop stopped")
|
||||||
|
|
Loading…
Reference in a new issue