aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/livestreamer/plugins/__init__.py
diff options
context:
space:
mode:
authorGravatar Christopher Rosell <chrippa@tanuki.se>2012-08-24 02:28:42 +0200
committerGravatar Christopher Rosell <chrippa@tanuki.se>2012-08-24 02:28:42 +0200
commit93af278d6170cb38eeb189fe8deb957b98d20876 (patch)
treedac21fc404df9326cb44200ca7b365f8163d0684 /src/livestreamer/plugins/__init__.py
parent2846ee256b11ec3e577fab35f0c063e6428951b3 (diff)
Add some docs.
Diffstat (limited to 'src/livestreamer/plugins/__init__.py')
-rw-r--r--src/livestreamer/plugins/__init__.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/livestreamer/plugins/__init__.py b/src/livestreamer/plugins/__init__.py
index 4c70fdc..ad96f6c 100644
--- a/src/livestreamer/plugins/__init__.py
+++ b/src/livestreamer/plugins/__init__.py
@@ -1,6 +1,10 @@
from livestreamer.options import Options
class Plugin(object):
+ """
+ A plugin can retrieve stream information from the *url* specified.
+ """
+
options = Options()
def __init__(self, url):
@@ -20,6 +24,16 @@ class Plugin(object):
return cls.options.get(key)
def get_streams(self):
+ """
+ Retrieves and returns a :class:`dict` containing the streams.
+
+ The key is the name of the stream, most commonly the quality.
+ The value is a :class:`Stream` object.
+
+ The stream with key *best* is a reference to the stream most likely
+ to be of highest quality.
+ """
+
ranking = ["iphonelow", "iphonehigh", "240p", "320k", "360p", "850k",
"480p", "1400k", "720p", "2400k", "hd", "1080p", "live"]
streams = self._get_streams()