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