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

Added Cambridge Audio discoverable. #191

Merged
merged 4 commits into from
May 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions netdisco/discoverables/cambridgeaudio.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
""" Discover Cambridge Audio StreamMagic devices. """
from . import SSDPDiscoverable


class Discoverable(SSDPDiscoverable):
"""Add support for discovering Cambridge Audio StreamMagic devices."""

def get_entries(self):
"""Get all Cambridge Audio MediaRenderer uPnP entries."""
return self.find_by_device_description({
"manufacturer": "Cambridge Audio",
"deviceType": "urn:schemas-upnp-org:device:MediaRenderer:1"
})

def info_from_entry(self, entry):
"""Get most important info, which is name, model and host."""
info = super().info_from_entry(entry)
return info