Skip to content

Commit

Permalink
Merge pull request #90 from Eyevinn/fix-58
Browse files Browse the repository at this point in the history
Partial revert (maintaining the added unit tests) in the fix for #58
  • Loading branch information
leandromoreira authored Oct 11, 2016
2 parents a725489 + 8f9c2d5 commit 06a9ab8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion m3u8/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ class Key(BasePathMixin):
'''

def __init__(self, method, uri, base_uri, iv=None, keyformat=None, keyformatversions=None):
def __init__(self, method, base_uri, uri=None, iv=None, keyformat=None, keyformatversions=None):
self.method = method
self.uri = uri
self.iv = iv
Expand Down
2 changes: 0 additions & 2 deletions m3u8/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ def _parse_key(line):
for param in params:
name, value = param.split('=', 1)
key[normalize_attribute(name)] = remove_quotes(value)
if key['method'] == "NONE":
key['uri'] = ''
return key


Expand Down
2 changes: 1 addition & 1 deletion tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def test_replace_segment_key():
obj = m3u8.M3U8(playlists.PLAYLIST_WITH_MULTIPLE_KEYS_UNENCRYPTED_AND_ENCRYPTED)

# Replace unencrypted segments with new key
new_key = Key("AES-128", "/hls-key/key0.bin", None, iv="0Xcafe8f758ca555115584bb5b3c687f52")
new_key = Key("AES-128", None, "/hls-key/key0.bin", iv="0Xcafe8f758ca555115584bb5b3c687f52")
for segment in obj.segments.by_key(None):
segment.key = new_key

Expand Down

0 comments on commit 06a9ab8

Please sign in to comment.