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

Commit a0b3e32

Browse files
Brentballoob
authored andcommitted
Added support for roku (#31)
1 parent 91b5688 commit a0b3e32

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

netdisco/discoverables/roku.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""Discovers Roku players."""
2+
3+
from netdisco.util import urlparse
4+
from . import SSDPDiscoverable
5+
6+
7+
class Discoverable(SSDPDiscoverable):
8+
"""Adds support for discovering Roku media players."""
9+
10+
def info_from_entry(self, entry):
11+
"""Returns the most important info from a uPnP entry."""
12+
info = urlparse(entry.location)
13+
return info.hostname, info.port
14+
15+
def get_entries(self):
16+
"""Get all the Roku entries."""
17+
return self.find_by_st("roku:ecp")

0 commit comments

Comments
 (0)