Merge branch '2.4.x' of dev.sourcefabric.org:airtime into 2.4.x
Conflicts: python_apps/pypo/liquidsoap_scripts/ls_script.liq
This commit is contained in:
commit
5c11f5fc72
|
@ -383,6 +383,7 @@ class PlaylistController extends Zend_Controller_Action
|
|||
$this->createUpdateResponse($obj);
|
||||
} else {
|
||||
$this->view->cue_error = $response["error"];
|
||||
$this->view->code = $response["type"];
|
||||
}
|
||||
} catch (PlaylistOutDatedException $e) {
|
||||
$this->playlistOutdated($e);
|
||||
|
|
|
@ -10,6 +10,10 @@ require_once 'formatters/LengthFormatter.php';
|
|||
*/
|
||||
class Application_Model_Playlist implements Application_Model_LibraryEditable
|
||||
{
|
||||
const CUE_ALL_ERROR = 0;
|
||||
const CUE_IN_ERROR = 1;
|
||||
const CUE_OUT_ERROR = 2;
|
||||
|
||||
/**
|
||||
* propel connection object.
|
||||
*/
|
||||
|
@ -792,6 +796,7 @@ SQL;
|
|||
try {
|
||||
if (is_null($cueIn) && is_null($cueOut)) {
|
||||
$errArray["error"] = _("Cue in and cue out are null.");
|
||||
$errArray["type"] = self::CUE_ALL_ERROR;
|
||||
|
||||
return $errArray;
|
||||
}
|
||||
|
@ -822,6 +827,7 @@ SQL;
|
|||
$sql = "SELECT :cueIn::INTERVAL > :cueOut::INTERVAL";
|
||||
if (Application_Common_Database::prepareAndExecute($sql, array(':cueIn'=>$cueIn, ':cueOut'=>$cueOut), 'column')) {
|
||||
$errArray["error"] = _("Can't set cue in to be larger than cue out.");
|
||||
$errArray["type"] = self::CUE_IN_ERROR;
|
||||
|
||||
return $errArray;
|
||||
}
|
||||
|
@ -829,6 +835,7 @@ SQL;
|
|||
$sql = "SELECT :cueOut::INTERVAL > :origLength::INTERVAL";
|
||||
if (Application_Common_Database::prepareAndExecute($sql, array(':cueOut'=>$cueOut, ':origLength'=>$origLength), 'column')) {
|
||||
$errArray["error"] = _("Can't set cue out to be greater than file length.");
|
||||
$errArray["type"] = self::CUE_OUT_ERROR;
|
||||
|
||||
return $errArray;
|
||||
}
|
||||
|
@ -845,6 +852,7 @@ SQL;
|
|||
$sql = "SELECT :cueIn::INTERVAL > :oldCueOut::INTERVAL";
|
||||
if (Application_Common_Database::prepareAndExecute($sql, array(':cueIn'=>$cueIn, ':oldCueOut'=>$oldCueOut), 'column')) {
|
||||
$errArray["error"] = _("Can't set cue in to be larger than cue out.");
|
||||
$errArray["type"] = self::CUE_IN_ERROR;
|
||||
|
||||
return $errArray;
|
||||
}
|
||||
|
@ -863,6 +871,7 @@ SQL;
|
|||
$sql = "SELECT :cueOut::INTERVAL < :oldCueIn::INTERVAL";
|
||||
if (Application_Common_Database::prepareAndExecute($sql, array(':cueOut'=>$cueOut, ':oldCueIn'=>$oldCueIn), 'column')) {
|
||||
$errArray["error"] = _("Can't set cue out to be smaller than cue in.");
|
||||
$errArray["type"] = self::CUE_OUT_ERROR;
|
||||
|
||||
return $errArray;
|
||||
}
|
||||
|
@ -870,6 +879,7 @@ SQL;
|
|||
$sql = "SELECT :cueOut::INTERVAL > :origLength::INTERVAL";
|
||||
if (Application_Common_Database::prepareAndExecute($sql, array(':cueOut'=>$cueOut, ':origLength'=>$origLength), 'column')) {
|
||||
$errArray["error"] = _("Can't set cue out to be greater than file length.");
|
||||
$errArray["type"] = self::CUE_OUT_ERROR;
|
||||
|
||||
return $errArray;
|
||||
}
|
||||
|
|
|
@ -144,7 +144,8 @@ var AIRTIME = (function(AIRTIME){
|
|||
var url = baseUrl+"Playlist/set-cue",
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val(),
|
||||
li;
|
||||
li,
|
||||
span;
|
||||
|
||||
if (!isTimeValid(cueIn)){
|
||||
$el.find('.cue-in-error').val($.i18n._("please put in a time '00:00:00 (.0)'")).show();
|
||||
|
@ -174,7 +175,27 @@ var AIRTIME = (function(AIRTIME){
|
|||
return;
|
||||
}
|
||||
if (json.cue_error !== undefined) {
|
||||
showError(span, json.cue_error);
|
||||
|
||||
li = $('#side_playlist li[unqid='+id+']');
|
||||
|
||||
if (json.code === 0) {
|
||||
|
||||
span = $('#spl_cue_in_'+id).find('span');
|
||||
showError(span, json.cue_error);
|
||||
span = $('#spl_cue_out_'+id).find('span');
|
||||
showError(span, json.cue_error);
|
||||
}
|
||||
else if (json.code === 1) {
|
||||
|
||||
span = $('#spl_cue_in_'+id).find('span');
|
||||
showError(span, json.cue_error);
|
||||
}
|
||||
else if (json.code === 2) {
|
||||
|
||||
span = $('#spl_cue_out_'+id).find('span');
|
||||
showError(span, json.cue_error);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,6 +70,11 @@ create_source()
|
|||
|
||||
queue = add(!sources, normalize=false)
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
# the crossfade function controls fade in/out
|
||||
|
||||
>>>>>>> 551d65ebf04d877bdba009a92c62bfa4f08eea9c
|
||||
output.dummy(fallible=true, queue)
|
||||
|
||||
http = input.http_restart(id="http")
|
||||
|
|
Loading…
Reference in New Issue