Streaming control added.

This commit is contained in:
Pecusx
2017-05-07 13:41:34 +02:00
committed by GitHub
parent 7c8582765a
commit 9a824c4041
+14
View File
@@ -326,6 +326,18 @@ class Radio:
self.loadStations()
self.setInterrupt()
elif key == 'STREAMING_TOGGLE':
self.toggleStreaming()
self.setInterrupt()
elif key == 'STREAMING_ON':
self.streamingOn()
self.setInterrupt()
elif key == 'STREAMING_OFF':
self.streamingOff()
self.setInterrupt()
elif key == 'KEY_MEDIA': # and remote dedicated button (Pecus)
if self.display_mode != self.MODE_SLEEP: # no in sleep mode! (Pecus)
self.setPlayerSource() # (Pecus)
@@ -1388,6 +1400,7 @@ class Radio:
# Switch on Icecast2 streaming
def streamingOn(self):
if not self.streaming:
output_id = 2
self.streaming = True
self.execCommand("service icecast2 start")
@@ -1399,6 +1412,7 @@ class Radio:
# Switch off Icecast2 streaming
def streamingOff(self):
if self.streaming:
output_id = 2
self.streaming = False
self.execMpcCommand("disable " + str(output_id))