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))) {
|
if($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) {
|
||||||
try{
|
try{
|
||||||
$show = new Application_Model_ShowInstance($showInstanceId);
|
$showInstance = new Application_Model_ShowInstance($showInstanceId);
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
$this->view->show_error = true;
|
$this->view->show_error = true;
|
||||||
return false;
|
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))) {
|
if($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) {
|
||||||
$showInstanceId = $this->_getParam('id');
|
$showInstanceId = $this->_getParam('id');
|
||||||
try{
|
try{
|
||||||
$show = new Application_Model_ShowInstance($showInstanceId);
|
$showInstance = new Application_Model_ShowInstance($showInstanceId);
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
$this->view->show_error = true;
|
$this->view->show_error = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$show->clearShow();
|
$showInstance->clearShow();
|
||||||
$show->deleteShow();
|
$showInstance->delete();
|
||||||
// send 'cancel-current-show' command to pypo
|
// send 'cancel-current-show' command to pypo
|
||||||
Application_Model_RabbitMq::SendMessageToPypo("cancel_current_show", array());
|
Application_Model_RabbitMq::SendMessageToPypo("cancel_current_show", array());
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ class Application_Model_Show {
|
||||||
}
|
}
|
||||||
|
|
||||||
//remove everything about this 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
|
//usually we hide the show-instance, but in this case we are deleting the show template
|
||||||
//so delete all show-instances as well.
|
//so delete all show-instances as well.
|
||||||
|
|
|
@ -435,10 +435,10 @@ class Application_Model_ShowInstance {
|
||||||
$this->updateScheduledTime();
|
$this->updateScheduledTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteShow()
|
public function delete()
|
||||||
{
|
{
|
||||||
global $CC_DBC;
|
global $CC_DBC;
|
||||||
|
|
||||||
// see if it was recording show
|
// see if it was recording show
|
||||||
$recording = $this->isRecorded();
|
$recording = $this->isRecorded();
|
||||||
// get show id
|
// get show id
|
||||||
|
@ -446,10 +446,9 @@ class Application_Model_ShowInstance {
|
||||||
|
|
||||||
$show = $this->getShow();
|
$show = $this->getShow();
|
||||||
|
|
||||||
$current_timestamp = gmdate("Y-m-d H:i");
|
$current_timestamp = gmdate("Y-m-d H:i:s");
|
||||||
|
|
||||||
if ($current_timestamp < $this->getShowInstanceStart()) {
|
|
||||||
|
|
||||||
|
if ($current_timestamp <= $this->getShowInstanceEnd()) {
|
||||||
if ($show->isRepeating()) {
|
if ($show->isRepeating()) {
|
||||||
|
|
||||||
CcShowInstancesQuery::create()
|
CcShowInstancesQuery::create()
|
||||||
|
@ -486,8 +485,7 @@ class Application_Model_ShowInstance {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
$show->delete();
|
||||||
$show->deleteShow();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,30 +2,30 @@
|
||||||
$s_name = "s".$this->stream_number;
|
$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>
|
<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">
|
<fieldset class="padded">
|
||||||
<dl class="zend_form clearfix">
|
<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?>
|
<?php echo $this->liquidsoap_error_msg?>
|
||||||
</dd>
|
</dd>
|
||||||
<dt id="<?=$s_name?>Enabled-label">
|
<dt id="<?php echo $s_name?>Enabled-label">
|
||||||
<label for="<?=$s_name?>Enabled"><?php echo $this->element->getElement('enable')->getLabel() ?></label>
|
<label for="<?php echo $s_name?>Enabled"><?php echo $this->element->getElement('enable')->getLabel() ?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="<?=$s_name?>Enabled-element">
|
<dd id="<?php echo $s_name?>Enabled-element">
|
||||||
<?php echo $this->element->getElement('enable')?>
|
<?php echo $this->element->getElement('enable')?>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt id="<?=$s_name?>Type-label">
|
<dt id="<?php echo $s_name?>Type-label">
|
||||||
<label for="<?=$s_name?>Type"><?php echo $this->element->getElement('type')->getLabel()?></label>
|
<label for="<?php echo $s_name?>Type"><?php echo $this->element->getElement('type')->getLabel()?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="<?=$s_name?>Type-element">
|
<dd id="<?php echo $s_name?>Type-element">
|
||||||
<?php echo $this->element->getElement('type')?>
|
<?php echo $this->element->getElement('type')?>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt id="<?=$s_name?>Bitrate-label">
|
<dt id="<?php echo $s_name?>Bitrate-label">
|
||||||
<label for="<?=$s_name?>Bitrate"><?php echo $this->element->getElement('bitrate')->getLabel()?></label>
|
<label for="<?php echo $s_name?>Bitrate"><?php echo $this->element->getElement('bitrate')->getLabel()?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="<?=$s_name?>Bitrate-element">
|
<dd id="<?php echo $s_name?>Bitrate-element">
|
||||||
<?php echo $this->element->getElement('bitrate')?>
|
<?php echo $this->element->getElement('bitrate')?>
|
||||||
</dd>
|
</dd>
|
||||||
<dt id="outputServer-label">
|
<dt id="outputServer-label">
|
||||||
|
@ -54,10 +54,10 @@
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</dd>
|
</dd>
|
||||||
<dt id="<?=$s_name?>Output-label">
|
<dt id="<?php echo $s_name?>Output-label">
|
||||||
<label for="<?=$s_name?>Output"><?php echo $this->element->getElement('output')->getLabel()?></label>
|
<label for="<?php echo $s_name?>Output"><?php echo $this->element->getElement('output')->getLabel()?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="<?=$s_name?>Output-element">
|
<dd id="<?php echo $s_name?>Output-element">
|
||||||
<?php echo $this->element->getElement('output')?>
|
<?php echo $this->element->getElement('output')?>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
@ -159,4 +159,4 @@
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -81,8 +81,8 @@ function checkLiquidsoapStatus(){
|
||||||
var json_obj = jQuery.parseJSON(json);
|
var json_obj = jQuery.parseJSON(json);
|
||||||
for(var i=0;i<json_obj.length;i++){
|
for(var i=0;i<json_obj.length;i++){
|
||||||
var obj = json_obj[i];
|
var obj = json_obj[i];
|
||||||
var id
|
var id;
|
||||||
var status
|
var status;
|
||||||
for(var key in obj){
|
for(var key in obj){
|
||||||
if(key == "id"){
|
if(key == "id"){
|
||||||
id = obj[key];
|
id = obj[key];
|
||||||
|
@ -91,15 +91,15 @@ function checkLiquidsoapStatus(){
|
||||||
status = obj[key];
|
status = obj[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var html
|
var html;
|
||||||
if(status == "OK"){
|
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"){
|
}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"){
|
}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{
|
}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);
|
$("#s"+id+"Liquidsoap-error-msg-element").html(html);
|
||||||
}
|
}
|
||||||
|
@ -175,4 +175,4 @@ $(document).ready(function() {
|
||||||
showErrorSections()
|
showErrorSections()
|
||||||
setInterval('checkLiquidsoapStatus()', 1000)
|
setInterval('checkLiquidsoapStatus()', 1000)
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -73,7 +73,6 @@ SCRIPTPATH=`dirname $SCRIPT`
|
||||||
AIRTIMEROOT=$SCRIPTPATH/../
|
AIRTIMEROOT=$SCRIPTPATH/../
|
||||||
|
|
||||||
# Check if airtime exists already
|
# Check if airtime exists already
|
||||||
echo "* Checking for existing Airtime installation..."
|
|
||||||
set +e
|
set +e
|
||||||
php --php-ini ${SCRIPTPATH}/airtime-php.ini ${SCRIPTPATH}/include/airtime-installed-check.php
|
php --php-ini ${SCRIPTPATH}/airtime-php.ini ${SCRIPTPATH}/include/airtime-installed-check.php
|
||||||
result=$?
|
result=$?
|
||||||
|
|
|
@ -20,7 +20,7 @@ AirtimeInstall::ExitIfNotRoot();
|
||||||
|
|
||||||
$version = AirtimeInstall::GetVersionInstalled();
|
$version = AirtimeInstall::GetVersionInstalled();
|
||||||
// The current version is already installed.
|
// 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 (isset($version)){
|
||||||
if ($version === false){
|
if ($version === false){
|
||||||
//version of Airtime older than 1.7.0 detected
|
//version of Airtime older than 1.7.0 detected
|
||||||
|
|
Loading…
Reference in New Issue