CC-4623: Library: Preview button for Flac does not work
- fixed
This commit is contained in:
parent
d7a5ab4d94
commit
575400b4c2
|
@ -292,7 +292,8 @@ SQL;
|
||||||
ft.artist_name AS file_artist_name,
|
ft.artist_name AS file_artist_name,
|
||||||
ft.album_title AS file_album_title,
|
ft.album_title AS file_album_title,
|
||||||
ft.length AS file_length,
|
ft.length AS file_length,
|
||||||
ft.file_exists AS file_exists
|
ft.file_exists AS file_exists,
|
||||||
|
ft.mime AS file_mime
|
||||||
SQL;
|
SQL;
|
||||||
$filesJoin = <<<SQL
|
$filesJoin = <<<SQL
|
||||||
cc_schedule AS sched
|
cc_schedule AS sched
|
||||||
|
@ -319,7 +320,8 @@ SQL;
|
||||||
sub.login AS file_artist_name,
|
sub.login AS file_artist_name,
|
||||||
ws.description AS file_album_title,
|
ws.description AS file_album_title,
|
||||||
ws.length AS file_length,
|
ws.length AS file_length,
|
||||||
't'::BOOL AS file_exists
|
't'::BOOL AS file_exists,
|
||||||
|
NULL as file_mime
|
||||||
SQL;
|
SQL;
|
||||||
$streamJoin = <<<SQL
|
$streamJoin = <<<SQL
|
||||||
cc_schedule AS sched
|
cc_schedule AS sched
|
||||||
|
|
|
@ -41,6 +41,7 @@ class Application_Model_ShowBuilder
|
||||||
"fadein" => "",
|
"fadein" => "",
|
||||||
"fadeout" => "",
|
"fadeout" => "",
|
||||||
"image" => false,
|
"image" => false,
|
||||||
|
"mime" => null,
|
||||||
"color" => "", //in hex without the '#' sign.
|
"color" => "", //in hex without the '#' sign.
|
||||||
"backgroundColor" => "", //in hex without the '#' sign.
|
"backgroundColor" => "", //in hex without the '#' sign.
|
||||||
);
|
);
|
||||||
|
@ -277,6 +278,7 @@ class Application_Model_ShowBuilder
|
||||||
$row["cueout"] = $p_item["cue_out"];
|
$row["cueout"] = $p_item["cue_out"];
|
||||||
$row["fadein"] = round(substr($p_item["fade_in"], 6), 6);
|
$row["fadein"] = round(substr($p_item["fade_in"], 6), 6);
|
||||||
$row["fadeout"] = round(substr($p_item["fade_out"], 6), 6);
|
$row["fadeout"] = round(substr($p_item["fade_out"], 6), 6);
|
||||||
|
$row["mime"] = $p_item["file_mime"];
|
||||||
|
|
||||||
$row["pos"] = $this->pos++;
|
$row["pos"] = $this->pos++;
|
||||||
|
|
||||||
|
@ -471,7 +473,7 @@ class Application_Model_ShowBuilder
|
||||||
$display_items[] = $this->makeFooterRow($scheduled_items[
|
$display_items[] = $this->makeFooterRow($scheduled_items[
|
||||||
count($scheduled_items)-1]);
|
count($scheduled_items)-1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
"schedule" => $display_items,
|
"schedule" => $display_items,
|
||||||
"showInstances" => $this->showInstances);
|
"showInstances" => $this->showInstances);
|
||||||
|
|
|
@ -37,6 +37,11 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
var $nRow = $(nRow);
|
var $nRow = $(nRow);
|
||||||
if (aData.ftype === "audioclip") {
|
if (aData.ftype === "audioclip") {
|
||||||
$nRow.addClass("lib-audio");
|
$nRow.addClass("lib-audio");
|
||||||
|
$image = $nRow.find('td.library_type');
|
||||||
|
if (!isAudioSupported(aData.mime)) {
|
||||||
|
$image.html('<span class="ui-icon ui-icon-locked"></span>');
|
||||||
|
aData.image = '<span class="ui-icon ui-icon-locked"></span>';
|
||||||
|
}
|
||||||
} else if (aData.ftype === "stream") {
|
} else if (aData.ftype === "stream") {
|
||||||
$nRow.addClass("lib-stream");
|
$nRow.addClass("lib-stream");
|
||||||
} else if (aData.ftype === "block") {
|
} else if (aData.ftype === "block") {
|
||||||
|
|
|
@ -29,6 +29,11 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
|
|
||||||
if (aData.ftype === "audioclip") {
|
if (aData.ftype === "audioclip") {
|
||||||
$nRow.addClass("lib-audio");
|
$nRow.addClass("lib-audio");
|
||||||
|
$image = $nRow.find('td.library_type');
|
||||||
|
if (!isAudioSupported(aData.mime)) {
|
||||||
|
$image.html('<span class="ui-icon ui-icon-locked"></span>');
|
||||||
|
aData.image = '<span class="ui-icon ui-icon-locked"></span>';
|
||||||
|
}
|
||||||
} else if (aData.ftype === "stream") {
|
} else if (aData.ftype === "stream") {
|
||||||
$nRow.addClass("lib-stream");
|
$nRow.addClass("lib-stream");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -542,7 +542,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
type = $("#library_display_type").find("select").val();
|
type = $("#library_display_type").find("select").val();
|
||||||
type = (type === undefined) ? 0 : type;
|
type = (type === undefined) ? 0 : type;
|
||||||
aoData.push( { name: "type", value: type} );
|
aoData.push( { name: "type", value: type} );
|
||||||
|
|
||||||
$.ajax( {
|
$.ajax( {
|
||||||
"dataType": 'json',
|
"dataType": 'json',
|
||||||
"type": "POST",
|
"type": "POST",
|
||||||
|
@ -562,7 +562,9 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
// pl_
|
// pl_
|
||||||
open_playlist_preview(playlistIndex, 0);
|
open_playlist_preview(playlistIndex, 0);
|
||||||
} else if (aData.ftype === 'audioclip') {
|
} else if (aData.ftype === 'audioclip') {
|
||||||
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
|
if (isAudioSupported(aData.mime)) {
|
||||||
|
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
|
||||||
|
}
|
||||||
} else if (aData.ftype == 'stream') {
|
} else if (aData.ftype == 'stream') {
|
||||||
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
|
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
|
||||||
} else if (aData.ftype == 'block' && aData.bl_type == 'static') {
|
} else if (aData.ftype == 'block' && aData.bl_type == 'static') {
|
||||||
|
|
|
@ -369,7 +369,8 @@ var AIRTIME = (function(AIRTIME){
|
||||||
/* cue in */ {"mDataProp": "cuein", "sTitle": "Cue In", "bVisible": false, "sClass": "sb-cue-in"},
|
/* cue in */ {"mDataProp": "cuein", "sTitle": "Cue In", "bVisible": false, "sClass": "sb-cue-in"},
|
||||||
/* cue out */ {"mDataProp": "cueout", "sTitle": "Cue Out", "bVisible": false, "sClass": "sb-cue-out"},
|
/* cue out */ {"mDataProp": "cueout", "sTitle": "Cue Out", "bVisible": false, "sClass": "sb-cue-out"},
|
||||||
/* fade in */ {"mDataProp": "fadein", "sTitle": "Fade In", "bVisible": false, "sClass": "sb-fade-in"},
|
/* fade in */ {"mDataProp": "fadein", "sTitle": "Fade In", "bVisible": false, "sClass": "sb-fade-in"},
|
||||||
/* fade out */ {"mDataProp": "fadeout", "sTitle": "Fade Out", "bVisible": false, "sClass": "sb-fade-out"}
|
/* fade out */ {"mDataProp": "fadeout", "sTitle": "Fade Out", "bVisible": false, "sClass": "sb-fade-out"},
|
||||||
|
/* Mime */ {"mDataProp" : "mime", "sTitle" : "Mime", "bVisible": false, "sClass": "sb-mime"}
|
||||||
],
|
],
|
||||||
|
|
||||||
"bJQueryUI": true,
|
"bJQueryUI": true,
|
||||||
|
@ -549,11 +550,16 @@ var AIRTIME = (function(AIRTIME){
|
||||||
$image = $nRow.find('td.sb-image');
|
$image = $nRow.find('td.sb-image');
|
||||||
//check if the file exists.
|
//check if the file exists.
|
||||||
if (aData.image === true) {
|
if (aData.image === true) {
|
||||||
$image.html('<img title="Track preview" src="/css/images/icon_audioclip.png"></img>')
|
$nRow.addClass("lib-audio");
|
||||||
|
if (!isAudioSupported(aData.mime)) {
|
||||||
|
$image.html('<span class="ui-icon ui-icon-locked"></span>');
|
||||||
|
} else {
|
||||||
|
$image.html('<img title="Track preview" src="/css/images/icon_audioclip.png"></img>')
|
||||||
.click(function() {
|
.click(function() {
|
||||||
open_show_preview(aData.instance, aData.pos);
|
open_show_preview(aData.instance, aData.pos);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$image.html('<span class="ui-icon ui-icon-alert"></span>');
|
$image.html('<span class="ui-icon ui-icon-alert"></span>');
|
||||||
|
|
Loading…
Reference in New Issue