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:
parent
a748b55312
commit
dea4a3ce2c
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user