Merge branch 'airtime-2.0.x' of dev.sourcefabric.org:airtime into airtime-2.0.x

This commit is contained in:
martin 2012-01-13 18:31:21 -05:00
commit 6add525fb1
10 changed files with 31 additions and 14 deletions

View File

@ -377,6 +377,7 @@ class ApiController extends Zend_Controller_Action
$this->view->is_recording = false; $this->view->is_recording = false;
$this->view->server_timezone = Application_Model_Preference::GetTimezone();
$rows = Application_Model_Show::GetCurrentShow($today_timestamp); $rows = Application_Model_Show::GetCurrentShow($today_timestamp);
Application_Model_Show::ConvertToLocalTimeZone($rows, array("starts", "ends", "start_timestamp", "end_timestamp")); Application_Model_Show::ConvertToLocalTimeZone($rows, array("starts", "ends", "start_timestamp", "end_timestamp"));

View File

@ -194,7 +194,7 @@ class PreferenceController extends Zend_Controller_Action
} }
} }
if($form->isValid($post_data)){ 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'); $values['output_sound_device'] = $form->getValue('output_sound_device');
} }

View File

@ -68,9 +68,15 @@ class Application_Form_StreamSetting extends Zend_Form
} }
public function isValid($data){ public function isValid($data){
if($data['output_sound_device']){ if(isset($data['output_sound_device'])){
$this->populate(array("output_sound_device"=>$data['output_sound_device'], "icecast_vorbis_metadata"=>$data['icecast_vorbis_metadata'], $d = array();
"output_sound_device_type"=>$data['output_sound_device_type'], "streamFormat"=>$data['streamFormat'])); $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; return true;
} }

View File

@ -5,6 +5,9 @@ class Airtime_View_Helper_TrialRemaining extends Zend_View_Helper_Abstract
public function trialRemaining() public function trialRemaining()
{ {
$ending_date = Application_Model_Preference::GetTrialEndingDate(); $ending_date = Application_Model_Preference::GetTrialEndingDate();
if ($ending_date == '') {
return '';
}
$datetime1 = new DateTime(); $datetime1 = new DateTime();
$datetime2 = new DateTime($ending_date); $datetime2 = new DateTime($ending_date);
$interval = $datetime1->diff($datetime2); $interval = $datetime1->diff($datetime2);

View File

@ -36,15 +36,15 @@
<li><span class="name"><?php echo $this->user ?></span> | <a href="/Login/logout">Logout</a></li> <li><span class="name"><?php echo $this->user ?></span> | <a href="/Login/logout">Logout</a></li>
</ul> </ul>
</div> </div>
<?php if($this->is_trial){?> <?php if($this->trial_remain != '' && $this->trial_remain != "Trial expired."){?>
<div class="trial-box"> <div class="trial-box">
<p>Your Trial expires in</p> <p>Your trial expires in</p>
<div class="trial-box-calendar"> <div class="trial-box-calendar">
<span class="trial-box-calendar-white"><?php echo $this->trial_remain?></span> <span class="trial-box-calendar-white"><?php echo $this->trial_remain?></span>
<div class="trial-box-calendar-gray">days</div> <div class="trial-box-calendar-gray">days</div>
</div> </div>
<div class="trial-box-button"> <div class="trial-box-button">
<a title="Purchase your copy of Airtime" href="https://account.sourcefabric.com/clientarea.php" target="_blank">Buy Now</a> <a title="Purchase your copy of Airtime" href="https://account.sourcefabric.com/clientarea.php" target="_blank">My Account</a>
</div> </div>
</div> </div>
<?php }?> <?php }?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 B

After

Width:  |  Height:  |  Size: 405 B

View File

@ -125,6 +125,12 @@ $(document).ready(function() {
rebuildStreamURL($(this)) 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(){ $("#output_sound_device").change(function(){
if($(this).is(':checked')){ if($(this).is(':checked')){
$("select[id=output_sound_device_type]").removeAttr('disabled') $("select[id=output_sound_device_type]").removeAttr('disabled')

View File

@ -52,10 +52,6 @@ if [ "$?" -ne "0" ]; then
exit 1 exit 1
fi fi
# Install phing
pear channel-discover pear.phing.info
pear install phing/phing-2.4.2
# Apache Config File # Apache Config File
echo "----------------------------------------------------" echo "----------------------------------------------------"
echo "2. Apache Config File" echo "2. Apache Config File"

View File

@ -25,3 +25,5 @@ record_samplerate = 44100
record_channels = 2 record_channels = 2
record_sample_size = 16 record_sample_size = 16
#can be either ogg|mp3, mp3 recording requires installation of the package "lame"
record_file_type = 'ogg'

View File

@ -270,13 +270,15 @@ class CommandListener():
'hour': start_time_on_server.hour, 'min': start_time_on_server.minute, 'sec': start_time_on_server.second} '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 = ShowRecorder(show_instance, show_name, show_length.seconds, start_time_formatted)
self.sr.start() self.sr.start()
#remove show from shows to record. #remove show from shows to record.
del self.shows_to_record[start_time] del self.shows_to_record[start_time]
time_till_next_show = self.get_time_till_next_show() time_till_next_show = self.get_time_till_next_show()
self.time_till_next_show = time_till_next_show self.time_till_next_show = time_till_next_show
except Exception,e : 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: else:
self.logger.debug("No recording scheduled...") self.logger.debug("No recording scheduled...")
@ -297,6 +299,7 @@ class CommandListener():
temp = self.api_client.get_shows_to_record() temp = self.api_client.get_shows_to_record()
if temp is not None: if temp is not None:
shows = temp['shows'] shows = temp['shows']
self.server_timezone = temp['server_timezone']
self.parse_shows(shows) self.parse_shows(shows)
self.logger.info("Bootstrap complete: got initial copy of the schedule") self.logger.info("Bootstrap complete: got initial copy of the schedule")
except Exception, e: except Exception, e: