Use bytestrings when parsing M3U playlists

Fixes #853

(cherry picked from commit d666083c6f)
This commit is contained in:
kingosticks 2015-01-04 20:26:45 +00:00 committed by Stein Magnus Jodal
parent fe8a9f8c39
commit 7556af83b7

View File

@ -57,11 +57,11 @@ def parse_m3u(data):
# TODO: convert non URIs to file URIs.
found_header = False
for line in data.readlines():
if found_header or line.startswith('#EXTM3U'):
if found_header or line.startswith(b'#EXTM3U'):
found_header = True
else:
continue
if not line.startswith('#') and line.strip():
if not line.startswith(b'#') and line.strip():
yield line.strip()