Site
Gitweb
Static
projects
/
hls-watch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f27cec5
)
Fix attr list parsing bugs
author
Jakob Cornell
<jakob+gpg@jcornell.net>
Tue, 6 Oct 2020 03:23:38 +0000
(22:23 -0500)
committer
Jakob Cornell
<jakob+gpg@jcornell.net>
Tue, 6 Oct 2020 03:23:38 +0000
(22:23 -0500)
hls_watch/playlist.py
patch
|
blob
|
history
diff --git
a/hls_watch/playlist.py
b/hls_watch/playlist.py
index 36fe9127eef22149b0b44fb46b2276e874a058e9..f964b4c139548d96547a16896448901b14847fa5 100644
(file)
--- a/
hls_watch/playlist.py
+++ b/
hls_watch/playlist.py
@@
-118,7
+118,7
@@
def _parse_attrs(string):
# decimal-resolution
m = re.match(r'(?P<h>\d+)x(?P<v>\d+)(?P<rest>,.+|$)$', string)
if m:
- return
Resolution._make(map(int, m.groups()
))
+ return
(Resolution(int(m.group('h')), int(m.group('v'))), m.group('rest'
))
m = re.match('(?P<v>[^,]*)(?P<rest>,.+|$)$', string)
return m.groups()
@@
-130,6
+130,7
@@
def _parse_attrs(string):
assert rest[0] == '='
(val, rest) = pop_value(rest[1:])
items.append((key, val))
+ rest = rest.lstrip(',')
attrs = dict(items)
assert len(attrs) == len(items)