Fixes for streaming problems.

This commit is contained in:
Pecusx
2017-05-07 21:11:43 +02:00
committed by GitHub
parent 5282cd3a3a
commit 44614544f0
3 changed files with 9 additions and 3 deletions
+7 -2
View File
@@ -568,8 +568,13 @@ def display_current(lcd,radio,toggleScrolling):
metadataFormatted = metadataFormatted.replace("&","%26")
metadataFormatted = metadataFormatted.replace("@","%40")
metadataFormatted = metadataFormatted.replace(" ","+") #add "+" instead of " " for icecast2
requestToSend = ("http://localhost:8001/admin/metadata?mount=/mpd&mode=updinfo&song=") +(metadataFormatted)
r = requests.get((requestToSend), auth=("admin","mympd"))
# metadataFormatted = "Test+characters+x"
try:
requestToSend = ("http://localhost:8001/admin/metadata?mount=/mpd&mode=updinfo&song=") +(metadataFormatted)
r = requests.get((requestToSend), auth=("admin","mympd"))
except:
log.message("Send metadata do icacast server problem - metadata: " + metadataFormatted, log.ERROR)
# Display stream error
if radio.gotError():
+1
View File
@@ -449,6 +449,7 @@ class Radio:
# Icecast Streaming settings
self.streaming = self.getStoredStreaming()
if self.streaming:
self.streaming = False
self.streamingOn()
else:
self.streamingOff()
+1 -1
View File
@@ -1 +1 @@
5.5d
5.5e