Skip to content

Commit 02353e1

Browse files
committed
ensure 'Source' identified for parser
1 parent 5139fff commit 02353e1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

resources/lib/twitch/parser.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,8 @@ def m3u8_to_dict(string):
2323
matches = re.finditer(_m3u_pattern, string)
2424
for m in matches:
2525
d[m.group('group_name')] = m.group('url')
26+
if m.group('group_id') == 'chunked':
27+
d.update({'Source': m.group('url')}) # ensure Source stream identified for consistency
28+
2629
log.debug('m3u8_to_dict result:\n{}'.format(d))
2730
return d

0 commit comments

Comments
 (0)