From beb1d879101d5aa10d04a038911e5d16f262f6ae Mon Sep 17 00:00:00 2001 From: Pecusx Date: Fri, 13 Jan 2017 00:20:49 +0100 Subject: [PATCH] Option to start PiRadio in Pandora mode. --- config_class.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config_class.py b/config_class.py index e452ad3..e56783d 100755 --- a/config_class.py +++ b/config_class.py @@ -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