1
mirror of https://github.com/streamlink/streamlink synced 2024-10-26 16:22:14 +02:00

Excluding streams of a protocol that's not in the priority list

because that allow the user to exclude protocols
This commit is contained in:
John Peterson 2013-05-15 04:51:16 +02:00
parent a748b55312
commit dea4a3ce2c
2 changed files with 3 additions and 2 deletions

View File

@ -130,7 +130,8 @@ class Plugin(object):
streams[sname] = stream
else:
streams[name] = stream
if type(stream).shortname() in priority:
streams[name] = stream
sort = sorted(filter(qualityweight, streams.keys()),
key=qualityweight)

View File

@ -47,7 +47,7 @@ class TestSession(unittest.TestCase):
def test_plugin(self):
channel = self.session.resolve_url("http://test.se/channel")
streams = channel.get_streams(priority=["http", "rtmp"])
streams = channel.get_streams()
self.assertTrue("best" in streams)
self.assertTrue("worst" in streams)