diff options
Diffstat (limited to 'src/livestreamer/plugins/__init__.py')
-rw-r--r-- | src/livestreamer/plugins/__init__.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/livestreamer/plugins/__init__.py b/src/livestreamer/plugins/__init__.py index cf6954b..a4e39cc 100644 --- a/src/livestreamer/plugins/__init__.py +++ b/src/livestreamer/plugins/__init__.py @@ -23,6 +23,16 @@ class Plugin(object): self.args = args def get_streams(self): + ranking = ['iphonelow', 'iphonehigh', '240p', '360p', '480p', '720p', + 'hd', '1080p', 'live'] + streams = self._get_streams() + for rank in reversed(ranking): + if rank in streams: + streams['best'] = streams[rank] + break + return streams + + def _get_streams(self): raise NotImplementedError def load_plugins(plugins): |