mirror of
https://github.com/pkali/piradio-mini.git
synced 2026-05-20 22:34:22 +02:00
Option to start PiRadio in Pandora mode.
This commit is contained in:
@@ -30,6 +30,7 @@ class Configuration:
|
|||||||
# Input source
|
# Input source
|
||||||
RADIO = 0
|
RADIO = 0
|
||||||
PLAYER = 1
|
PLAYER = 1
|
||||||
|
PANDORA = 2
|
||||||
LIST = 0
|
LIST = 0
|
||||||
STREAM = 1
|
STREAM = 1
|
||||||
|
|
||||||
@@ -186,6 +187,8 @@ class Configuration:
|
|||||||
elif option == 'startup':
|
elif option == 'startup':
|
||||||
if parameter == 'MEDIA':
|
if parameter == 'MEDIA':
|
||||||
self.source = self.PLAYER
|
self.source = self.PLAYER
|
||||||
|
elif parameter == 'PANDORA':
|
||||||
|
self.source = self.PANDORA
|
||||||
|
|
||||||
elif option == 'station_names':
|
elif option == 'station_names':
|
||||||
if parameter == 'stream':
|
if parameter == 'stream':
|
||||||
@@ -283,6 +286,10 @@ class Configuration:
|
|||||||
+ section + ' in ' + ConfigFile
|
+ section + ' in ' + ConfigFile
|
||||||
log.message(msg,log.ERROR)
|
log.message(msg,log.ERROR)
|
||||||
|
|
||||||
|
if self.source == self.PANDORA:
|
||||||
|
if not self.pandora_available:
|
||||||
|
self.source = self.RADIO
|
||||||
|
|
||||||
range = self.volume_max - self.volume_min
|
range = self.volume_max - self.volume_min
|
||||||
if range < 22:
|
if range < 22:
|
||||||
self.volume_min = 0
|
self.volume_min = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user