From d666083c6fe8fe17a5880b6e8e55890cf51992c4 Mon Sep 17 00:00:00 2001 From: kingosticks Date: Sun, 4 Jan 2015 20:26:45 +0000 Subject: [PATCH] Use bytestrings when parsing M3U playlists Fixes #853 --- mopidy/audio/playlists.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mopidy/audio/playlists.py b/mopidy/audio/playlists.py index 5688db4b..5a362191 100644 --- a/mopidy/audio/playlists.py +++ b/mopidy/audio/playlists.py @@ -58,11 +58,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()