Merge branch '2.4.x' of dev.sourcefabric.org:airtime into 2.4.x
This commit is contained in:
commit
6520211b4d
7 changed files with 83 additions and 78 deletions
|
@ -322,7 +322,8 @@ SQL;
|
|||
ft.album_title AS file_album_title,
|
||||
ft.length AS file_length,
|
||||
ft.file_exists AS file_exists,
|
||||
ft.mime AS file_mime
|
||||
ft.mime AS file_mime,
|
||||
ft.soundcloud_id AS soundcloud_id
|
||||
SQL;
|
||||
$filesJoin = <<<SQL
|
||||
cc_schedule AS sched
|
||||
|
@ -357,7 +358,8 @@ SQL;
|
|||
ws.description AS file_album_title,
|
||||
ws.length AS file_length,
|
||||
't'::BOOL AS file_exists,
|
||||
ws.mime as file_mime
|
||||
ws.mime AS file_mime,
|
||||
(SELECT NULL::integer AS soundcloud_id)
|
||||
SQL;
|
||||
$streamJoin = <<<SQL
|
||||
cc_schedule AS sched
|
||||
|
|
|
@ -796,7 +796,7 @@ SQL;
|
|||
|
||||
//soundcloud status
|
||||
$file = Application_Model_StoredFile::RecallById($row['id']);
|
||||
$row['soundcloud_status'] = $file->getSoundCloudId();
|
||||
$row['soundcloud_id'] = $file->getSoundCloudId();
|
||||
|
||||
// for audio preview
|
||||
$row['audioFile'] = $row['id'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION);
|
||||
|
|
|
@ -593,12 +593,12 @@ var AIRTIME = (function(AIRTIME) {
|
|||
"fnRowCallback": AIRTIME.library.fnRowCallback,
|
||||
"fnCreatedRow": function( nRow, aData, iDataIndex ) {
|
||||
//add soundcloud icon
|
||||
if (aData.soundcloud_status !== undefined) {
|
||||
if (aData.soundcloud_status === "-2") {
|
||||
if (aData.soundcloud_id !== undefined) {
|
||||
if (aData.soundcloud_id === "-2") {
|
||||
$(nRow).find("td.library_title").append('<span class="small-icon progress"/>');
|
||||
} else if (aData.soundcloud_status === "-3") {
|
||||
} else if (aData.soundcloud_id === "-3") {
|
||||
$(nRow).find("td.library_title").append('<span class="small-icon sc-error"/>');
|
||||
} else if (aData.soundcloud_status !== null) {
|
||||
} else if (aData.soundcloud_id !== null) {
|
||||
$(nRow).find("td.library_title").append('<span class="small-icon soundcloud"/>');
|
||||
}
|
||||
}
|
||||
|
@ -1141,9 +1141,12 @@ function checkLibrarySCUploadStatus(){
|
|||
}
|
||||
|
||||
function addQtipToSCIcons() {
|
||||
$(".progress, .soundcloud, .sc-error").live('mouseover', function(){
|
||||
$("#content")
|
||||
.on('mouseover', ".progress, .soundcloud, .sc-error", function() {
|
||||
|
||||
var id = $(this).parent().parent().data("aData").id;
|
||||
var aData = $(this).parents("tr").data("aData"),
|
||||
id = aData.id,
|
||||
sc_id = aData.soundcloud_id;
|
||||
|
||||
if ($(this).hasClass("progress")){
|
||||
$(this).qtip({
|
||||
|
@ -1163,24 +1166,15 @@ function addQtipToSCIcons(){
|
|||
classes: "ui-tooltip-dark file-md-long"
|
||||
},
|
||||
show: {
|
||||
ready: true // Needed to make it show on first mouseover
|
||||
// event
|
||||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
});
|
||||
}
|
||||
else if ($(this).hasClass("soundcloud")){
|
||||
var sc_id = $(this).parent().parent().data("aData").soundcloud_id;
|
||||
|
||||
$(this).qtip({
|
||||
content: {
|
||||
text: $.i18n._("Retrieving data from the server..."),
|
||||
ajax: {
|
||||
url: baseUrl+"Library/get-upload-to-soundcloud-status",
|
||||
type: "post",
|
||||
data: ({format: "json", id : id, type: "file"}),
|
||||
success: function(json, status){
|
||||
this.set('content.text', $.i18n._("The soundcloud id for this file is: ")+json.sc_id);
|
||||
}
|
||||
}
|
||||
text: $.i18n._("The soundcloud id for this file is: ") + sc_id
|
||||
},
|
||||
position:{
|
||||
adjust: {
|
||||
|
@ -1195,11 +1189,11 @@ function addQtipToSCIcons(){
|
|||
classes: "ui-tooltip-dark file-md-long"
|
||||
},
|
||||
show: {
|
||||
ready: true // Needed to make it show on first mouseover
|
||||
// event
|
||||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
});
|
||||
}else if($(this).hasClass("sc-error")){
|
||||
}
|
||||
else if ($(this).hasClass("sc-error")) {
|
||||
$(this).qtip({
|
||||
content: {
|
||||
text: $.i18n._("Retreiving data from the server..."),
|
||||
|
@ -1227,8 +1221,7 @@ function addQtipToSCIcons(){
|
|||
classes: "ui-tooltip-dark file-md-long"
|
||||
},
|
||||
show: {
|
||||
ready: true // Needed to make it show on first mouseover
|
||||
// event
|
||||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -546,7 +546,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
cl = 'sb-footer';
|
||||
|
||||
//check the show's content status.
|
||||
if (aData.runtime > 0) {
|
||||
if (aData.runtime >= 0) {
|
||||
$node.html('<span class="ui-icon ui-icon-check"></span>');
|
||||
cl = cl + ' ui-state-highlight';
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ PIDFILE=/var/run/airtime-liquidsoap.pid
|
|||
EXEC='/usr/bin/airtime-liquidsoap'
|
||||
|
||||
start () {
|
||||
|
||||
mkdir -p /var/log/airtime/pypo-liquidsoap
|
||||
chown $USERID:$GROUPID /var/log/airtime/pypo-liquidsoap
|
||||
|
||||
|
@ -37,8 +36,17 @@ start () {
|
|||
|
||||
stop () {
|
||||
#send term signal after 10 seconds
|
||||
timeout --version
|
||||
$RESULT="$?"
|
||||
if [ "$RESULT" = "0" ]; then
|
||||
timeout -s9 10s /usr/lib/airtime/airtime_virtualenv/bin/python \
|
||||
/usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap_prepare_terminate.py
|
||||
else
|
||||
#some earlier versions of Ubuntu (Lucid) had a different timeout
|
||||
#command that takes different input parameters.
|
||||
timeout 10 /usr/lib/airtime/airtime_virtualenv/bin/python \
|
||||
/usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap_prepare_terminate.py
|
||||
fi
|
||||
# Send TERM after 5 seconds, wait at most 30 seconds.
|
||||
#start-stop-daemon --stop --oknodo --retry=TERM/10/KILL/5 --quiet --pidfile $PIDFILE
|
||||
start-stop-daemon --stop --oknodo --retry=TERM/10/KILL/5 --quiet --exec $EXEC
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
set httpd port 2812
|
||||
|
||||
check process airtime-liquidsoap matching "airtime-liquidsoap.*airtime.*ls_script"
|
||||
if does not exist for 3 cycles then restart
|
||||
|
||||
start program = "/etc/init.d/airtime-liquidsoap start" with timeout 30 seconds
|
||||
stop program = "/etc/init.d/airtime-liquidsoap stop"
|
||||
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
|
||||
check process airtime-liquidsoap
|
||||
with pidfile "/var/run/airtime-liquidsoap.pid"
|
||||
start program = "/etc/init.d/airtime-liquidsoap start" with timeout 5 seconds
|
||||
stop program = "/etc/init.d/airtime-liquidsoap stop"
|
||||
start program = "/etc/init.d/airtime-liquidsoap start-with-monit" with timeout 5 seconds
|
||||
stop program = "/etc/init.d/airtime-liquidsoap stop-with-monit"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue