Converting byte strings to strings during pls read

This commit is contained in:
Steffen Schuhmann 2020-07-26 15:20:46 +02:00
parent ab8a295228
commit 26a9913703

View file

@ -483,7 +483,7 @@ class Playlist(Record):
def populate_pls(self, data): def populate_pls(self, data):
sorttracks = [] sorttracks = []
for i in data: for i in data:
dataarr = i.decode('utf-8').strip().split("=") dataarr = i.decode('utf-8').strip().split("=", 1)
if dataarr[0].lower().startswith("file"): if dataarr[0].lower().startswith("file"):
num = int(dataarr[0][4:]) num = int(dataarr[0][4:])
filename = urllib.parse.unquote(dataarr[1]).strip() filename = urllib.parse.unquote(dataarr[1]).strip()