Skip to content
This repository was archived by the owner on Oct 1, 2021. It is now read-only.

Commit 9be4a78

Browse files
StevenLoomanballoob
authored andcommitted
Separate DLNA_DMR and DLNA_DMS devices (#204)
* Separate DLNA_DMR and DLNA_DMS devices * Fixing lint issues * Keeping pylint happy
1 parent 0ee0730 commit 9be4a78

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

netdisco/const.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""Constants of services that can be discovered."""
22

33
BELKIN_WEMO = "belkin_wemo"
4-
DLNA = "DLNA"
4+
DLNA_DMS = "DLNA_DMS"
5+
DLNA_DMR = "DLNA_DMR"
56
GOOGLE_CAST = "google_cast"
67
PHILIPS_HUE = "philips_hue"
78
PMS = 'plex_mediaserver'
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ class Discoverable(SSDPDiscoverable):
77

88
def get_entries(self):
99
"""Get all the DLNA service uPnP entries."""
10-
return self.find_by_st("urn:schemas-upnp-org:device:MediaServer:1") + \
11-
self.find_by_st("urn:schemas-upnp-org:device:MediaRenderer:1")
10+
return \
11+
self.find_by_st("urn:schemas-upnp-org:device:MediaRenderer:1") + \
12+
self.find_by_st("urn:schemas-upnp-org:device:MediaRenderer:2") + \
13+
self.find_by_st("urn:schemas-upnp-org:device:MediaRenderer:3")

netdisco/discoverables/dlna_dms.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""Discover DLNA services."""
2+
from . import SSDPDiscoverable
3+
4+
5+
class Discoverable(SSDPDiscoverable):
6+
"""Add support for discovering DLNA services."""
7+
8+
def get_entries(self):
9+
"""Get all the DLNA service uPnP entries."""
10+
return self.find_by_st("urn:schemas-upnp-org:device:MediaServer:1") + \
11+
self.find_by_st("urn:schemas-upnp-org:device:MediaServer:2") + \
12+
self.find_by_st("urn:schemas-upnp-org:device:MediaServer:3") + \
13+
self.find_by_st("urn:schemas-upnp-org:device:MediaServer:4")

0 commit comments

Comments
 (0)