CC-3484: Pypo: On bootup, it should grab station name and stream label
for liquidsoap - fixed
This commit is contained in:
parent
44e8e96cc8
commit
ef801c7a10
|
@ -660,6 +660,7 @@ class AirTimeApiClient(ApiClientInterface):
|
||||||
response = json.loads(response)
|
response = json.loads(response)
|
||||||
logger.info("Bootstrap info retrieved %s", response)
|
logger.info("Bootstrap info retrieved %s", response)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
response = None
|
||||||
import traceback
|
import traceback
|
||||||
top = traceback.format_exc()
|
top = traceback.format_exc()
|
||||||
logger.error('Exception: %s', e)
|
logger.error('Exception: %s', e)
|
||||||
|
|
|
@ -150,12 +150,16 @@ class PypoFetch(Thread):
|
||||||
def set_bootstrap_variables(self):
|
def set_bootstrap_variables(self):
|
||||||
self.logger.debug('Getting information needed on bootstrap from Airtime')
|
self.logger.debug('Getting information needed on bootstrap from Airtime')
|
||||||
info = self.api_client.get_bootstrap_info()
|
info = self.api_client.get_bootstrap_info()
|
||||||
self.logger.debug('info:%s',info)
|
if info == None:
|
||||||
for k, v in info['switch_status'].iteritems():
|
self.logger.error('Unable to get bootstrap info.. Existing pypo...')
|
||||||
self.switch_source(k, v)
|
sys.exit(0)
|
||||||
self.update_liquidsoap_stream_format(info['stream_label'])
|
else:
|
||||||
self.update_liquidsoap_station_name(info['station_name'])
|
self.logger.debug('info:%s',info)
|
||||||
self.update_liquidsoap_transition_fade(info['transition_fade'])
|
for k, v in info['switch_status'].iteritems():
|
||||||
|
self.switch_source(k, v)
|
||||||
|
self.update_liquidsoap_stream_format(info['stream_label'])
|
||||||
|
self.update_liquidsoap_station_name(info['station_name'])
|
||||||
|
self.update_liquidsoap_transition_fade(info['transition_fade'])
|
||||||
|
|
||||||
def regenerateLiquidsoapConf(self, setting_p):
|
def regenerateLiquidsoapConf(self, setting_p):
|
||||||
existing = {}
|
existing = {}
|
||||||
|
|
Loading…
Reference in New Issue