You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As raised in radujica/tospotify#27, looks like some music players can store playlists with missing duration in #EXTINF, e.g.
#EXTINF:,Song
which leads to an exception such as
File "/home/serenity/.local/lib/python3.10/site-packages/m3u8/init.py", line 49, in load
return _load_from_file(uri, custom_tags_parser)
File "/home/serenity/.local/lib/python3.10/site-packages/m3u8/init.py", line 56, in _load_from_file
return M3U8(raw_content, base_uri=base_uri, custom_tags_parser=custom_tags_parser)
File "/home/serenity/.local/lib/python3.10/site-packages/m3u8/model.py", line 153, in init
self.data = parse(content, strict, custom_tags_parser)
File "/home/serenity/.local/lib/python3.10/site-packages/m3u8/parser.py", line 143, in parse
_parse_extinf(line, data, state, lineno, strict)
File "/home/serenity/.local/lib/python3.10/site-packages/m3u8/parser.py", line 261, in _parse_extinf
state['segment']['duration'] = float(duration)
ValueError: could not convert string to float: ''
Now according to https://en.wikipedia.org/wiki/M3U, that's technically invalid m3u format, however could perhaps show a better error OR ignore and default to duration=0?
As raised in radujica/tospotify#27, looks like some music players can store playlists with missing duration in
#EXTINF
, e.g.#EXTINF:,Song
which leads to an exception such as
Now according to https://en.wikipedia.org/wiki/M3U, that's technically invalid m3u format, however could perhaps show a better error OR ignore and default to duration=0?
Something like this for option 2: #343
The text was updated successfully, but these errors were encountered: