Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
9523174a0f
|
@ -143,13 +143,13 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
if($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) {
|
||||
try{
|
||||
$show = new Application_Model_ShowInstance($showInstanceId);
|
||||
$showInstance = new Application_Model_ShowInstance($showInstanceId);
|
||||
}catch(Exception $e){
|
||||
$this->view->show_error = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
$show->deleteShow();
|
||||
$showInstance->delete();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -821,13 +821,13 @@ class ScheduleController extends Zend_Controller_Action
|
|||
if($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) {
|
||||
$showInstanceId = $this->_getParam('id');
|
||||
try{
|
||||
$show = new Application_Model_ShowInstance($showInstanceId);
|
||||
$showInstance = new Application_Model_ShowInstance($showInstanceId);
|
||||
}catch(Exception $e){
|
||||
$this->view->show_error = true;
|
||||
return false;
|
||||
}
|
||||
$show->clearShow();
|
||||
$show->deleteShow();
|
||||
$showInstance->clearShow();
|
||||
$showInstance->delete();
|
||||
// send 'cancel-current-show' command to pypo
|
||||
Application_Model_RabbitMq::SendMessageToPypo("cancel_current_show", array());
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ class Application_Model_Show {
|
|||
}
|
||||
|
||||
//remove everything about this show.
|
||||
public function deleteShow()
|
||||
public function delete()
|
||||
{
|
||||
//usually we hide the show-instance, but in this case we are deleting the show template
|
||||
//so delete all show-instances as well.
|
||||
|
|
|
@ -435,10 +435,10 @@ class Application_Model_ShowInstance {
|
|||
$this->updateScheduledTime();
|
||||
}
|
||||
|
||||
public function deleteShow()
|
||||
public function delete()
|
||||
{
|
||||
global $CC_DBC;
|
||||
|
||||
|
||||
// see if it was recording show
|
||||
$recording = $this->isRecorded();
|
||||
// get show id
|
||||
|
@ -446,10 +446,9 @@ class Application_Model_ShowInstance {
|
|||
|
||||
$show = $this->getShow();
|
||||
|
||||
$current_timestamp = gmdate("Y-m-d H:i");
|
||||
|
||||
if ($current_timestamp < $this->getShowInstanceStart()) {
|
||||
$current_timestamp = gmdate("Y-m-d H:i:s");
|
||||
|
||||
if ($current_timestamp <= $this->getShowInstanceEnd()) {
|
||||
if ($show->isRepeating()) {
|
||||
|
||||
CcShowInstancesQuery::create()
|
||||
|
@ -486,8 +485,7 @@ class Application_Model_ShowInstance {
|
|||
}
|
||||
}
|
||||
else {
|
||||
|
||||
$show->deleteShow();
|
||||
$show->delete();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,30 +2,30 @@
|
|||
$s_name = "s".$this->stream_number;
|
||||
?>
|
||||
<h3 class="collapsible-header <?php echo $this->stream_number == '1'?"close":""?>"><span class="arrow-icon"></span>Stream <?php echo $this->stream_number?></h3>
|
||||
<div class="stream-setting-content" <?php echo $this->enabled == 0?'style="display: none;':''?> id="<?=$s_name?>-config">
|
||||
<div class="stream-setting-content" <?php echo $this->enabled == 0?'style="display: none;':''?> id="<?php echo $s_name?>-config">
|
||||
<fieldset class="padded">
|
||||
<dl class="zend_form clearfix">
|
||||
<dd id="<?=$s_name?>Liquidsoap-error-msg-element" class="liquidsoap_status">
|
||||
<dd id="<?php echo $s_name?>Liquidsoap-error-msg-element" class="liquidsoap_status">
|
||||
<?php echo $this->liquidsoap_error_msg?>
|
||||
</dd>
|
||||
<dt id="<?=$s_name?>Enabled-label">
|
||||
<label for="<?=$s_name?>Enabled"><?php echo $this->element->getElement('enable')->getLabel() ?></label>
|
||||
<dt id="<?php echo $s_name?>Enabled-label">
|
||||
<label for="<?php echo $s_name?>Enabled"><?php echo $this->element->getElement('enable')->getLabel() ?></label>
|
||||
</dt>
|
||||
<dd id="<?=$s_name?>Enabled-element">
|
||||
<dd id="<?php echo $s_name?>Enabled-element">
|
||||
<?php echo $this->element->getElement('enable')?>
|
||||
</dd>
|
||||
|
||||
<dt id="<?=$s_name?>Type-label">
|
||||
<label for="<?=$s_name?>Type"><?php echo $this->element->getElement('type')->getLabel()?></label>
|
||||
<dt id="<?php echo $s_name?>Type-label">
|
||||
<label for="<?php echo $s_name?>Type"><?php echo $this->element->getElement('type')->getLabel()?></label>
|
||||
</dt>
|
||||
<dd id="<?=$s_name?>Type-element">
|
||||
<dd id="<?php echo $s_name?>Type-element">
|
||||
<?php echo $this->element->getElement('type')?>
|
||||
</dd>
|
||||
|
||||
<dt id="<?=$s_name?>Bitrate-label">
|
||||
<label for="<?=$s_name?>Bitrate"><?php echo $this->element->getElement('bitrate')->getLabel()?></label>
|
||||
<dt id="<?php echo $s_name?>Bitrate-label">
|
||||
<label for="<?php echo $s_name?>Bitrate"><?php echo $this->element->getElement('bitrate')->getLabel()?></label>
|
||||
</dt>
|
||||
<dd id="<?=$s_name?>Bitrate-element">
|
||||
<dd id="<?php echo $s_name?>Bitrate-element">
|
||||
<?php echo $this->element->getElement('bitrate')?>
|
||||
</dd>
|
||||
<dt id="outputServer-label">
|
||||
|
@ -54,10 +54,10 @@
|
|||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<dt id="<?=$s_name?>Output-label">
|
||||
<label for="<?=$s_name?>Output"><?php echo $this->element->getElement('output')->getLabel()?></label>
|
||||
<dt id="<?php echo $s_name?>Output-label">
|
||||
<label for="<?php echo $s_name?>Output"><?php echo $this->element->getElement('output')->getLabel()?></label>
|
||||
</dt>
|
||||
<dd id="<?=$s_name?>Output-element">
|
||||
<dd id="<?php echo $s_name?>Output-element">
|
||||
<?php echo $this->element->getElement('output')?>
|
||||
</dd>
|
||||
|
||||
|
@ -159,4 +159,4 @@
|
|||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -81,8 +81,8 @@ function checkLiquidsoapStatus(){
|
|||
var json_obj = jQuery.parseJSON(json);
|
||||
for(var i=0;i<json_obj.length;i++){
|
||||
var obj = json_obj[i];
|
||||
var id
|
||||
var status
|
||||
var id;
|
||||
var status;
|
||||
for(var key in obj){
|
||||
if(key == "id"){
|
||||
id = obj[key];
|
||||
|
@ -91,15 +91,15 @@ function checkLiquidsoapStatus(){
|
|||
status = obj[key];
|
||||
}
|
||||
}
|
||||
var html
|
||||
var html;
|
||||
if(status == "OK"){
|
||||
html = '<div class="stream-status status-good"><h3>Connected to the streaming server</h3></div>'
|
||||
html = '<div class="stream-status status-good"><h3>Connected to the streaming server</h3></div>';
|
||||
}else if(status == "N/A"){
|
||||
html = '<div class="stream-status status-disabled"><h3>The stream is disabled</h3></div>'
|
||||
html = '<div class="stream-status status-disabled"><h3>The stream is disabled</h3></div>';
|
||||
}else if(status == "waiting"){
|
||||
html = '<div class="stream-status status-info"><h3>Getting information from the server...</h3></div>'
|
||||
html = '<div class="stream-status status-info"><h3>Getting information from the server...</h3></div>';
|
||||
}else{
|
||||
html = '<div class="stream-status status-error"><h3>Can not connect to the streaming server</h3><p>'+status+'</p></div>'
|
||||
html = '<div class="stream-status status-error"><h3>Can not connect to the streaming server</h3><p>'+status+'</p></div>';
|
||||
}
|
||||
$("#s"+id+"Liquidsoap-error-msg-element").html(html);
|
||||
}
|
||||
|
@ -175,4 +175,4 @@ $(document).ready(function() {
|
|||
showErrorSections()
|
||||
setInterval('checkLiquidsoapStatus()', 1000)
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -73,7 +73,6 @@ SCRIPTPATH=`dirname $SCRIPT`
|
|||
AIRTIMEROOT=$SCRIPTPATH/../
|
||||
|
||||
# Check if airtime exists already
|
||||
echo "* Checking for existing Airtime installation..."
|
||||
set +e
|
||||
php --php-ini ${SCRIPTPATH}/airtime-php.ini ${SCRIPTPATH}/include/airtime-installed-check.php
|
||||
result=$?
|
||||
|
|
|
@ -20,7 +20,7 @@ AirtimeInstall::ExitIfNotRoot();
|
|||
|
||||
$version = AirtimeInstall::GetVersionInstalled();
|
||||
// The current version is already installed.
|
||||
echo "* Checking for existing install of Airtime...".PHP_EOL;
|
||||
echo "* Checking for existing Airtime installation...".PHP_EOL;
|
||||
if (isset($version)){
|
||||
if ($version === false){
|
||||
//version of Airtime older than 1.7.0 detected
|
||||
|
|
Loading…
Reference in New Issue