File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 2121 r'NAME="(?P<group_name>[^"]*)"[,=\w]*\n'
2222 r'#EXT-X-STREAM-INF:.*'
2323 r'BANDWIDTH=(?P<bandwidth>[0-9]+),'
24+ r'(?:.*RESOLUTION="*(?P<resolution>[0-9xX]+)"*,)?'
2425 r'(?:.*FRAME-RATE=(?P<fps>[0-9.]+))?.*\n'
2526 r'(?P<url>http.*)' )
2627
@@ -89,7 +90,8 @@ def m3u8_to_dict(string):
8990 'name' : name ,
9091 'url' : m .group ('url' ),
9192 'bandwidth' : int (m .group ('bandwidth' )),
92- 'fps' : fps
93+ 'fps' : fps ,
94+ 'resolution' : m .group ('resolution' )
9395 }
9496 log .debug ('m3u8_to_dict result:\n {0}' .format (d ))
9597 return d
@@ -117,7 +119,8 @@ def m3u8_to_list(string):
117119 'name' : name ,
118120 'url' : m .group ('url' ),
119121 'bandwidth' : int (m .group ('bandwidth' )),
120- 'fps' : fps
122+ 'fps' : fps ,
123+ 'resolution' : m .group ('resolution' )
121124 })
122125
123126 log .debug ('m3u8_to_list result:\n {0}' .format (l ))
You can’t perform that action at this time.
0 commit comments