method to add and print radio stations

workspace
Brendan Howell 4 years ago
parent 14ceebfc03
commit 9d687ad5cc

@ -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()

Loading…
Cancel
Save