|
4 | 4 | # Licensed Apache 2.0 |
5 | 5 | # From https://github.com/home-assistant/netdisco/netdisco/gdm.py |
6 | 6 |
|
7 | | -Inspired by |
8 | | - hippojay's plexGDM: |
9 | | - https://github.com/hippojay/script.plexbmc.helper/resources/lib/plexgdm.py |
| 7 | +Inspired by: |
| 8 | + hippojay's plexGDM: https://github.com/hippojay/script.plexbmc.helper/resources/lib/plexgdm.py |
10 | 9 | iBaa's PlexConnect: https://github.com/iBaa/PlexConnect/PlexAPI.py |
11 | 10 | """ |
12 | 11 | import socket |
@@ -50,31 +49,31 @@ def update(self, scan_for_clients): |
50 | 49 |
|
51 | 50 | Examples of the dict list assigned to self.entries by this function: |
52 | 51 |
|
53 | | - Server: |
54 | | - [{'data': { |
55 | | - 'Content-Type': 'plex/media-server', |
56 | | - 'Host': '53f4b5b6023d41182fe88a99b0e714ba.plex.direct', |
57 | | - 'Name': 'myfirstplexserver', |
58 | | - 'Port': '32400', |
59 | | - 'Resource-Identifier': '646ab0aa8a01c543e94ba975f6fd6efadc36b7', |
60 | | - 'Updated-At': '1585769946', |
61 | | - 'Version': '1.18.8.2527-740d4c206', |
62 | | - }, |
63 | | - 'from': ('10.10.10.100', 32414)}] |
64 | | -
|
65 | | - Clients: |
66 | | - [{'data': {'Content-Type': 'plex/media-player', |
67 | | - 'Device-Class': 'stb', |
68 | | - 'Name': 'plexamp', |
69 | | - 'Port': '36000', |
70 | | - 'Product': 'Plexamp', |
71 | | - 'Protocol': 'plex', |
72 | | - 'Protocol-Capabilities': 'timeline,playback,playqueues,playqueues-creation', |
73 | | - 'Protocol-Version': '1', |
74 | | - 'Resource-Identifier': 'b6e57a3f-e0f8-494f-8884-f4b58501467e', |
75 | | - 'Version': '1.1.0', |
76 | | - }, |
77 | | - 'from': ('10.10.10.101', 32412)}] |
| 52 | + Server: |
| 53 | + [{'data': { |
| 54 | + 'Content-Type': 'plex/media-server', |
| 55 | + 'Host': '53f4b5b6023d41182fe88a99b0e714ba.plex.direct', |
| 56 | + 'Name': 'myfirstplexserver', |
| 57 | + 'Port': '32400', |
| 58 | + 'Resource-Identifier': '646ab0aa8a01c543e94ba975f6fd6efadc36b7', |
| 59 | + 'Updated-At': '1585769946', |
| 60 | + 'Version': '1.18.8.2527-740d4c206', |
| 61 | + }, |
| 62 | + 'from': ('10.10.10.100', 32414)}] |
| 63 | +
|
| 64 | + Clients: |
| 65 | + [{'data': {'Content-Type': 'plex/media-player', |
| 66 | + 'Device-Class': 'stb', |
| 67 | + 'Name': 'plexamp', |
| 68 | + 'Port': '36000', |
| 69 | + 'Product': 'Plexamp', |
| 70 | + 'Protocol': 'plex', |
| 71 | + 'Protocol-Capabilities': 'timeline,playback,playqueues,playqueues-creation', |
| 72 | + 'Protocol-Version': '1', |
| 73 | + 'Resource-Identifier': 'b6e57a3f-e0f8-494f-8884-f4b58501467e', |
| 74 | + 'Version': '1.1.0', |
| 75 | + }, |
| 76 | + 'from': ('10.10.10.101', 32412)}] |
78 | 77 | """ |
79 | 78 |
|
80 | 79 | gdm_msg = 'M-SEARCH * HTTP/1.0'.encode('ascii') |
|
0 commit comments