From 9d687ad5ccd9f7bfbffe831ff8d515904746e749 Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Sun, 22 Nov 2020 19:36:57 +0100 Subject: [PATCH] method to add and print radio stations --- screenless/bureau/audio/audio.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/screenless/bureau/audio/audio.py b/screenless/bureau/audio/audio.py index f343ef3..a2308d3 100644 --- a/screenless/bureau/audio/audio.py +++ b/screenless/bureau/audio/audio.py @@ -160,8 +160,7 @@ class Audio(Bureau): # if line startswith #EXTINF: title = first comma to EOL # if line startswith Title then title = first '=' to EOL title = "" - self.log.debug("PLAYLIST TEXT: \n" + resp.text) - for line in resp.text: + for line in resp.text.splitlines(): if line.startswith("#EXTINF:"): # this is m3u playlist - title is from first comma to EOL title = line[(line.find(',') + 1):].strip()