From ef801c7a100c2e8d85375885264eca331f831468 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 26 Mar 2012 17:44:07 -0400 Subject: [PATCH 1/3] CC-3484: Pypo: On bootup, it should grab station name and stream label for liquidsoap - fixed --- python_apps/api_clients/api_client.py | 1 + python_apps/pypo/pypofetch.py | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/python_apps/api_clients/api_client.py b/python_apps/api_clients/api_client.py index 4ff0f1cf9..1f32a993b 100755 --- a/python_apps/api_clients/api_client.py +++ b/python_apps/api_clients/api_client.py @@ -660,6 +660,7 @@ class AirTimeApiClient(ApiClientInterface): response = json.loads(response) logger.info("Bootstrap info retrieved %s", response) except Exception, e: + response = None import traceback top = traceback.format_exc() logger.error('Exception: %s', e) diff --git a/python_apps/pypo/pypofetch.py b/python_apps/pypo/pypofetch.py index 9c1d70f56..2526c5ac0 100644 --- a/python_apps/pypo/pypofetch.py +++ b/python_apps/pypo/pypofetch.py @@ -150,12 +150,16 @@ class PypoFetch(Thread): def set_bootstrap_variables(self): self.logger.debug('Getting information needed on bootstrap from Airtime') info = self.api_client.get_bootstrap_info() - self.logger.debug('info:%s',info) - 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']) + if info == None: + self.logger.error('Unable to get bootstrap info.. Existing pypo...') + sys.exit(0) + else: + self.logger.debug('info:%s',info) + 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): existing = {} From 7e92b96a67d645d64e3b0ceb8f537a4554607fef Mon Sep 17 00:00:00 2001 From: James Date: Mon, 26 Mar 2012 18:39:10 -0400 Subject: [PATCH 2/3] CC-3507: Live Stream status: naming - fixed css width --- airtime_mvc/public/css/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index c4a972adc..b637a2534 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -291,7 +291,7 @@ select { .source-info-block { padding:0 14px 0 2px; - min-width:180px; + min-width:200px; } .source-info-block li { From f41ebbe7a7645c53bc9db8dc6b2d998a9c9267dd Mon Sep 17 00:00:00 2001 From: James Date: Mon, 26 Mar 2012 18:56:28 -0400 Subject: [PATCH 3/3] CC-3521: Live Stream: Remove 2 second scilence when transition happens - reduced the blank duration to 0.1 sec --- python_apps/pypo/liquidsoap_scripts/ls_lib.liq | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_apps/pypo/liquidsoap_scripts/ls_lib.liq b/python_apps/pypo/liquidsoap_scripts/ls_lib.liq index eaee80605..873997c7e 100644 --- a/python_apps/pypo/liquidsoap_scripts/ls_lib.liq +++ b/python_apps/pypo/liquidsoap_scripts/ls_lib.liq @@ -18,7 +18,7 @@ end def transition(a,b) = log("transition called...") add(normalize=false, - [ sequence([ blank(duration=2.), + [ sequence([ blank(duration=0.1), fade.initial(duration=!default_dj_fade, b) ]), fade.final(duration=!default_dj_fade, a) ]) end