From 04b592b831cc85484b73b6bbc3ac567cbed749b9 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 12 Jan 2012 16:36:14 -0500 Subject: [PATCH 1/5] CC-3245: upgrade 1.8->2.0 cause error in show recorder - fixed --- airtime_mvc/application/controllers/ApiController.php | 1 + python_apps/show-recorder/recorder.py | 1 + 2 files changed, 2 insertions(+) diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 332a42ce0..53bb0008d 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -377,6 +377,7 @@ class ApiController extends Zend_Controller_Action $this->view->is_recording = false; + $this->view->server_timezone = Application_Model_Preference::GetTimezone(); $rows = Application_Model_Show::GetCurrentShow($today_timestamp); Application_Model_Show::ConvertToLocalTimeZone($rows, array("starts", "ends", "start_timestamp", "end_timestamp")); diff --git a/python_apps/show-recorder/recorder.py b/python_apps/show-recorder/recorder.py index da94e212c..ddfef802d 100644 --- a/python_apps/show-recorder/recorder.py +++ b/python_apps/show-recorder/recorder.py @@ -297,6 +297,7 @@ class CommandListener(): temp = self.api_client.get_shows_to_record() if temp is not None: shows = temp['shows'] + self.server_timezone = temp['server_timezone'] self.parse_shows(shows) self.logger.info("Bootstrap complete: got initial copy of the schedule") except Exception, e: From b215d816ac022dc4b33fad0bf2d24c94cb89004d Mon Sep 17 00:00:00 2001 From: Yuchen Wang Date: Fri, 13 Jan 2012 10:28:42 -0500 Subject: [PATCH 2/5] CC-3186: Design tweaks for tooltip Updated the icon to make it stand out more --- airtime_mvc/public/css/images/icon_info.png | Bin 347 -> 405 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/airtime_mvc/public/css/images/icon_info.png b/airtime_mvc/public/css/images/icon_info.png index 600e15d2359d09ea17d579b65b6d82b3b105c795..1cff9e5ee2f52355920d3e368d778a4a75e1cf25 100644 GIT binary patch delta 378 zcmV-=0fqkC0+j=hB!2;OQb$4nuFf3k00006VoOIv0RI600RN!9r;`8x010qNS#tmY z3ljhU3ljkVnw%H_000McNliru+yM;_8#$XzgEjyF0ToF^K~yNub<#mcgi#d6@n3Hv zqIF`JMT=uh`)HA9+bUY8v?`?$eS}sKDbp(T4O;a9(yCn~>VIk#!)P5bM4LOzyuI^q z9iIPvoO6#m(dl#ylu~No2pgzpyN5fRMa0M8ZZQAwLDr?s2niV`MAJ(1>D3ens~0@YXur5^EbbD zKO)}qM$2l{Ds#-qTwiist$IU&&kDbXyOdH3D;4~+7&FRCMEs&PW@+~Y&hcFWODUyA zJm9*-`Zz5jqKktPoWT>muv21t5z#FmB5tvbALG@>K}1}S{M8(8=Fz*QMO|SbA}$B! YAGPsFo61`(IsgCw07*qoM6N<$f|35ATL1t6 delta 320 zcmV-G0l)s01KR?SB!3xnMObuGZ)S9NVRB^vL1b@YWgtmyVP|DhWnpA_ami&o0002} zNkl;=Q*=$IZjmTD zMf3q8mgsqThiS|_{0#3qkN3|^DhxwQk_X1130#i7zy{30U4LA(B~u$*!ALTZ3ZMrr zV4xbwv<6x0UsHyZ0SnL-MwbIR?HE}!o9l3EIfL<_iBaVVRcvUIEszIAaMI-KHg8ha zm*=HL+<2p^JVz5u^Lgg8rkjB(J~VOhc0QH>mf*~(Nh&i6;XsFgFkN7z;=zx!9R>B1$^{>YKZUJ{8FKPu!U@3w>0R{lsQZR5Z ShcBxD0000 Date: Fri, 13 Jan 2012 16:24:16 -0500 Subject: [PATCH 3/5] CC-3245: upgrade 1.8->2.0 cause error in show recorder - new cofig field was missing from recorder.cfg.200 - better log when execption happens --- install_minimal/upgrades/airtime-2.0.0/recorder.cfg.200 | 2 ++ python_apps/show-recorder/recorder.py | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/install_minimal/upgrades/airtime-2.0.0/recorder.cfg.200 b/install_minimal/upgrades/airtime-2.0.0/recorder.cfg.200 index d6005bf0a..2765f9781 100644 --- a/install_minimal/upgrades/airtime-2.0.0/recorder.cfg.200 +++ b/install_minimal/upgrades/airtime-2.0.0/recorder.cfg.200 @@ -25,3 +25,5 @@ record_samplerate = 44100 record_channels = 2 record_sample_size = 16 +#can be either ogg|mp3, mp3 recording requires installation of the package "lame" +record_file_type = 'ogg' \ No newline at end of file diff --git a/python_apps/show-recorder/recorder.py b/python_apps/show-recorder/recorder.py index ddfef802d..80bc4ada8 100644 --- a/python_apps/show-recorder/recorder.py +++ b/python_apps/show-recorder/recorder.py @@ -261,7 +261,7 @@ class CommandListener(): show_length = self.shows_to_record[start_time][0] show_instance = self.shows_to_record[start_time][1] show_name = self.shows_to_record[start_time][2] - + T = pytz.timezone(self.server_timezone) start_time_on_UTC = getDateTimeObj(start_time) start_time_on_server = start_time_on_UTC.replace(tzinfo=pytz.utc).astimezone(T) @@ -270,13 +270,15 @@ class CommandListener(): 'hour': start_time_on_server.hour, 'min': start_time_on_server.minute, 'sec': start_time_on_server.second} self.sr = ShowRecorder(show_instance, show_name, show_length.seconds, start_time_formatted) self.sr.start() - #remove show from shows to record. del self.shows_to_record[start_time] time_till_next_show = self.get_time_till_next_show() self.time_till_next_show = time_till_next_show except Exception,e : - self.logger.error(e) + import traceback + top = traceback.format_exc() + self.logger.error('Exception: %s', e) + self.logger.error("traceback: %s", top) else: self.logger.debug("No recording scheduled...") From c82394b7a0b071882b0759854c5dfebfd8a93974 Mon Sep 17 00:00:00 2001 From: James Date: Fri, 13 Jan 2012 16:56:02 -0500 Subject: [PATCH 4/5] CC-3246: Hardware audio output cannot be switched off - fixed --- .../application/controllers/PreferenceController.php | 2 +- airtime_mvc/application/forms/StreamSetting.php | 12 +++++++++--- .../public/js/airtime/preferences/streamsetting.js | 6 ++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/application/controllers/PreferenceController.php b/airtime_mvc/application/controllers/PreferenceController.php index 8d227c7e7..03ddd677b 100644 --- a/airtime_mvc/application/controllers/PreferenceController.php +++ b/airtime_mvc/application/controllers/PreferenceController.php @@ -194,7 +194,7 @@ class PreferenceController extends Zend_Controller_Action } } if($form->isValid($post_data)){ - if(Application_Model_Preference::GetPlanLevel() == 'disabled'){// && $form->isValid($post_data['output_sound_device'])){ + if(Application_Model_Preference::GetPlanLevel() == 'disabled'){ $values['output_sound_device'] = $form->getValue('output_sound_device'); } diff --git a/airtime_mvc/application/forms/StreamSetting.php b/airtime_mvc/application/forms/StreamSetting.php index 6c4e59871..eda28845b 100644 --- a/airtime_mvc/application/forms/StreamSetting.php +++ b/airtime_mvc/application/forms/StreamSetting.php @@ -68,9 +68,15 @@ class Application_Form_StreamSetting extends Zend_Form } public function isValid($data){ - if($data['output_sound_device']){ - $this->populate(array("output_sound_device"=>$data['output_sound_device'], "icecast_vorbis_metadata"=>$data['icecast_vorbis_metadata'], - "output_sound_device_type"=>$data['output_sound_device_type'], "streamFormat"=>$data['streamFormat'])); + if(isset($data['output_sound_device'])){ + $d = array(); + $d["output_sound_device"] = $data['output_sound_device']; + $d["icecast_vorbis_metadata"] = $data['icecast_vorbis_metadata']; + if(isset($data['output_sound_device_type'])){ + $d["output_sound_device_type"] = $data['output_sound_device_type']; + } + $d["streamFormat"] = $data['streamFormat']; + $this->populate($d); } return true; } diff --git a/airtime_mvc/public/js/airtime/preferences/streamsetting.js b/airtime_mvc/public/js/airtime/preferences/streamsetting.js index a8195bb2d..a88d27ace 100644 --- a/airtime_mvc/public/js/airtime/preferences/streamsetting.js +++ b/airtime_mvc/public/js/airtime/preferences/streamsetting.js @@ -125,6 +125,12 @@ $(document).ready(function() { rebuildStreamURL($(this)) }) + if(!$("#output_sound_device").is(':checked')){ + $("select[id=output_sound_device_type]").attr('disabled', 'disabled') + }else{ + $("select[id=output_sound_device_type]").removeAttr('disabled') + } + $("#output_sound_device").change(function(){ if($(this).is(':checked')){ $("select[id=output_sound_device_type]").removeAttr('disabled') From 229db4cdb0db39382a97043637e55821660acc92 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 13 Jan 2012 18:30:59 -0500 Subject: [PATCH 5/5] -small fix for debian upgrade-test script --- dev_tools/fabric/fab_release_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev_tools/fabric/fab_release_test.py b/dev_tools/fabric/fab_release_test.py index f3c381623..3bf755eea 100644 --- a/dev_tools/fabric/fab_release_test.py +++ b/dev_tools/fabric/fab_release_test.py @@ -229,7 +229,8 @@ def airtime_18x_tar(root_dir, version): do_sudo('wget http://downloads.sourceforge.net/project/airtime/%s/airtime-%s.tar.gz' % (version, version)) do_sudo('tar xfz airtime-%s.tar.gz' % version) - do_sudo('cd ~/%s/install && php airtime-install.php' % root_dir) + #do_sudo('cd ~/%s/install && php airtime-install.php' % root_dir) + do_sudo('php ~/%s/install/airtime-install.php' % root_dir) #need to reboot because of daemon-tools. reboot(45)