Merge branch '2.1.x' of dev.sourcefabric.org:airtime into 2.1.x
This commit is contained in:
commit
d1c224321b
|
@ -53,7 +53,7 @@ class Application_Common_DateHelper
|
||||||
*/
|
*/
|
||||||
function getWeekStartDate()
|
function getWeekStartDate()
|
||||||
{
|
{
|
||||||
$startDate = date('w') == 0 ? date('Y-m-d') : date('Y-m-d', strtotime('monday'));
|
$startDate = date('w') == 0 ? date('Y-m-d') : date('Y-m-d', strtotime('monday this week'));
|
||||||
$startDateTime = new DateTime($startDate);
|
$startDateTime = new DateTime($startDate);
|
||||||
return $startDateTime->format('Y-m-d H:i:s');
|
return $startDateTime->format('Y-m-d H:i:s');
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,8 @@ class Application_Form_EditAudioMD extends Zend_Form
|
||||||
'label' => 'Track:',
|
'label' => 'Track:',
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'validators' => array('Int')
|
'validators' => array('Int'),
|
||||||
|
'required' => true
|
||||||
));
|
));
|
||||||
|
|
||||||
// Add genre field
|
// Add genre field
|
||||||
|
|
|
@ -886,9 +886,9 @@ Logging::log("getting media! - 2");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if file is playable
|
// Check if file is playable
|
||||||
$command = sprintf("/usr/bin/airtime-liquidsoap -c 'output.dummy(audio_to_stereo(single(\"%s\")))' > /dev/null 2>&1", $audio_file);
|
$command = sprintf("/usr/bin/airtime-liquidsoap -c 'output.dummy(audio_to_stereo(single(\"%s\")))' 2>&1", $audio_file);
|
||||||
exec($command, $output, $rv);
|
exec($command, $output, $rv);
|
||||||
if ($rv != 0) {
|
if ($rv != 0 || count($output) != 0) {
|
||||||
$result = array("code" => 110, "message" => "This file appears to be corrupted and will not be added to media library.");
|
$result = array("code" => 110, "message" => "This file appears to be corrupted and will not be added to media library.");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -301,6 +301,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
|
|
||||||
if (!$el.hasClass("ui-state-disabled")) {
|
if (!$el.hasClass("ui-state-disabled")) {
|
||||||
$el.addClass("ui-state-hover");
|
$el.addClass("ui-state-hover");
|
||||||
|
$("#show_builder .ui-icon-document-b").contextMenu(true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("#show_builder .ui-icon-document-b").contextMenu(false);
|
$("#show_builder .ui-icon-document-b").contextMenu(false);
|
||||||
|
|
Loading…
Reference in New Issue