diff options
author | Christopher Rosell <chrippa@tanuki.se> | 2012-03-21 13:10:02 +0100 |
---|---|---|
committer | Christopher Rosell <chrippa@tanuki.se> | 2012-03-21 13:10:02 +0100 |
commit | f175241692dfc461d773589653fd55c47508a293 (patch) | |
tree | 38e9bb2416c5631ea08038d607d46384d2c67758 /src/livestreamer/plugins/ownedtv.py | |
parent | 4ea8ddfd4d89ca96e81ddf07ec3c7d0abfc8de70 (diff) |
Change the way plugins are used.
Also use http as default protocol when URL is
missing protocol.
Diffstat (limited to 'src/livestreamer/plugins/ownedtv.py')
-rw-r--r-- | src/livestreamer/plugins/ownedtv.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/livestreamer/plugins/ownedtv.py b/src/livestreamer/plugins/ownedtv.py index 87df3ad..779dd2c 100644 --- a/src/livestreamer/plugins/ownedtv.py +++ b/src/livestreamer/plugins/ownedtv.py @@ -29,10 +29,11 @@ class OwnedTV(Plugin): "cdn3": "http://hwcdn.net/u4k2r7c4/fls", } + @classmethod def can_handle_url(self, url): return "own3d.tv" in url - def get_channel_id(self, url): + def _get_channel_id(self, url): fd = urlopener.open(url) data = fd.read() fd.close() @@ -45,8 +46,8 @@ class OwnedTV(Plugin): if match: return int(match.group(1)) - def get_streams(self, url): - channelid = self.get_channel_id(url) + def get_streams(self): + channelid = self._get_channel_id(self.url) if not channelid: return False |