8000 if EXT-X-KEY:METHOD=NONE, get TypeError: __init__() takes at least 4 arguments (3 given) · Issue #58 · globocom/m3u8 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000
if EXT-X-KEY:METHOD=NONE, get TypeError: __init__() takes at least 4 arguments (3 given) #58
Open
@sloh

Description

@sloh

in model.py > Class Segment() > init() for the following line:

self.key = Key(base_uri=base_uri,**key) if key else None

if a segment has "#EXT-X-KEY:METHOD=NONE", it is missing the uri parameter needed for class Key(), its init function:

def __init__(self, method, uri, base_uri, iv=None, keyformat=None, keyformatversions=None):

I believe uri should also be an optional parameter according to this documentation:

URI

   The value is a quoted-string containing a URI that specifies how to
   obtain the key.  This attribute is REQUIRED unless the METHOD is
   NONE.

http://tools.ietf.org/html/draft-pantos-http-live-streaming-16#section-4.3.2.4

The fix would be the following code for Key().init() where uri=None is the main different making it optional:

def __init__(self, method, base_uri, uri=None, iv=None, keyformat=None, keyformatversions=None):

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0