mirror of https://github.com/streamlink/streamlink
plugin: Add Plugin.broken decorator.
This commit is contained in:
parent
ada325e9c6
commit
a008c3fa24
|
@ -153,6 +153,24 @@ class Plugin(object):
|
|||
|
||||
return stream_types
|
||||
|
||||
@classmethod
|
||||
def broken(cls, issue=None):
|
||||
def func(*args, **kwargs):
|
||||
msg = (
|
||||
"This plugin has been marked as broken. This is likely due to "
|
||||
"changes to the service preventing a working implementation. "
|
||||
)
|
||||
|
||||
if issue:
|
||||
msg += "More info: https://github.com/chrippa/livestreamer/issues/{0}".format(issue)
|
||||
|
||||
raise PluginError(msg)
|
||||
|
||||
def decorator(*args, **kwargs):
|
||||
return func
|
||||
|
||||
return decorator
|
||||
|
||||
def streams(self, stream_types=None, sorting_excludes=None):
|
||||
"""Attempts to extract available streams.
|
||||
|
||||
|
|
Loading…
Reference in New Issue