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

Commit

Permalink
Added Cambridge Audio discoverable. (#191)
Browse files Browse the repository at this point in the history
* Added discoverable for Cambridge Audio StreamMagic platform.

* Fixed flake8 complaints.

* Fixed comment refering to different document.

* Removed duplicate attribute assignments.
  • Loading branch information
sebk-666 authored and balloob committed May 8, 2018
1 parent 3c6e1b9 commit 317c3b0
Showing 1 changed file with 18 additions and 0 deletions.
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

0 comments on commit 317c3b0

Please sign in to comment.