audio: Handle carriage return in playlist detection

This commit is contained in:
Thomas Adamcik 2014-06-20 21:31:12 +02:00
parent c87684aa6b
commit e7b39bd051

View File

@ -18,11 +18,11 @@ except ImportError:
# TODO: make detect_FOO_header reusable in general mopidy code.
# i.e. give it just a "peek" like function.
def detect_m3u_header(typefind):
return typefind.peek(0, 8).upper() == b'#EXTM3U\n'
return typefind.peek(0, 7).upper() == b'#EXTM3U'
def detect_pls_header(typefind):
return typefind.peek(0, 11).lower() == b'[playlist]\n'
return typefind.peek(0, 10).lower() == b'[playlist]'
def detect_xspf_header(typefind):