CC-4951: Add cue in and cue out to library filter columns
Done
This commit is contained in:
parent
49dc3140a8
commit
8bdf3508b0
2 changed files with 17 additions and 3 deletions
|
@ -645,7 +645,8 @@ SQL;
|
||||||
"track_number", "mood", "bpm", "composer", "info_url",
|
"track_number", "mood", "bpm", "composer", "info_url",
|
||||||
"bit_rate", "sample_rate", "isrc_number", "encoded_by", "label",
|
"bit_rate", "sample_rate", "isrc_number", "encoded_by", "label",
|
||||||
"copyright", "mime", "language", "filepath", "owner_id",
|
"copyright", "mime", "language", "filepath", "owner_id",
|
||||||
"conductor", "replay_gain", "lptime", "is_playlist", "is_scheduled" );
|
"conductor", "replay_gain", "lptime", "is_playlist", "is_scheduled",
|
||||||
|
"cuein", "cueout" );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function searchLibraryFiles($datatables)
|
public static function searchLibraryFiles($datatables)
|
||||||
|
@ -702,6 +703,11 @@ SQL;
|
||||||
$blSelect[] = "NULL::boolean AS ".$key;
|
$blSelect[] = "NULL::boolean AS ".$key;
|
||||||
$fileSelect[] = $key;
|
$fileSelect[] = $key;
|
||||||
$streamSelect[] = "NULL::boolean AS ".$key;
|
$streamSelect[] = "NULL::boolean AS ".$key;
|
||||||
|
} elseif ($key === "cuein" || $key === "cueout") {
|
||||||
|
$plSelect[] = "NULL::INTERVAL AS ".$key;
|
||||||
|
$blSelect[] = "NULL::INTERVAL AS ".$key;
|
||||||
|
$fileSelect[] = $key;
|
||||||
|
$streamSelect[] = "NULL::INTERVAL AS ".$key;
|
||||||
}
|
}
|
||||||
//same columns in each table.
|
//same columns in each table.
|
||||||
else if (in_array($key, array("length", "utime", "mtime"))) {
|
else if (in_array($key, array("length", "utime", "mtime"))) {
|
||||||
|
@ -783,8 +789,14 @@ SQL;
|
||||||
foreach ($results['aaData'] as &$row) {
|
foreach ($results['aaData'] as &$row) {
|
||||||
$row['id'] = intval($row['id']);
|
$row['id'] = intval($row['id']);
|
||||||
|
|
||||||
$formatter = new LengthFormatter($row['length']);
|
$len_formatter = new LengthFormatter($row['length']);
|
||||||
$row['length'] = $formatter->format();
|
$row['length'] = $len_formatter->format();
|
||||||
|
|
||||||
|
$cuein_formatter = new LengthFormatter($row["cuein"]);
|
||||||
|
$row["cuein"] = $cuein_formatter->format();
|
||||||
|
|
||||||
|
$cueout_formatter = new LengthFormatter($row["cueout"]);
|
||||||
|
$row["cueout"] = $cueout_formatter->format();
|
||||||
|
|
||||||
if ($row['ftype'] === "audioclip") {
|
if ($row['ftype'] === "audioclip") {
|
||||||
$formatter = new SamplerateFormatter($row['sample_rate']);
|
$formatter = new SamplerateFormatter($row['sample_rate']);
|
||||||
|
|
|
@ -467,6 +467,8 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
/* Composer */ { "sTitle" : $.i18n._("Composer") , "mDataProp" : "composer" , "bVisible" : false , "sClass" : "library_composer" , "sWidth" : "150px" },
|
/* Composer */ { "sTitle" : $.i18n._("Composer") , "mDataProp" : "composer" , "bVisible" : false , "sClass" : "library_composer" , "sWidth" : "150px" },
|
||||||
/* Conductor */ { "sTitle" : $.i18n._("Conductor") , "mDataProp" : "conductor" , "bVisible" : false , "sClass" : "library_conductor" , "sWidth" : "125px" },
|
/* Conductor */ { "sTitle" : $.i18n._("Conductor") , "mDataProp" : "conductor" , "bVisible" : false , "sClass" : "library_conductor" , "sWidth" : "125px" },
|
||||||
/* Copyright */ { "sTitle" : $.i18n._("Copyright") , "mDataProp" : "copyright" , "bVisible" : false , "sClass" : "library_copyright" , "sWidth" : "125px" },
|
/* Copyright */ { "sTitle" : $.i18n._("Copyright") , "mDataProp" : "copyright" , "bVisible" : false , "sClass" : "library_copyright" , "sWidth" : "125px" },
|
||||||
|
/* Cue In */ { "sTitle" : $.i18n._("Cue In") , "mDataProp" : "cuein" , "bVisible" : false , "sClass" : "library_length" , "sWidth" : "80px" },
|
||||||
|
/* Cue Out */ { "sTitle" : $.i18n._("Cue Out") , "mDataProp" : "cueout" , "bVisible" : false , "sClass" : "library_length" , "sWidth" : "80px" },
|
||||||
/* Encoded */ { "sTitle" : $.i18n._("Encoded By") , "mDataProp" : "encoded_by" , "bVisible" : false , "sClass" : "library_encoded" , "sWidth" : "150px" },
|
/* Encoded */ { "sTitle" : $.i18n._("Encoded By") , "mDataProp" : "encoded_by" , "bVisible" : false , "sClass" : "library_encoded" , "sWidth" : "150px" },
|
||||||
/* Genre */ { "sTitle" : $.i18n._("Genre") , "mDataProp" : "genre" , "bVisible" : false , "sClass" : "library_genre" , "sWidth" : "100px" },
|
/* Genre */ { "sTitle" : $.i18n._("Genre") , "mDataProp" : "genre" , "bVisible" : false , "sClass" : "library_genre" , "sWidth" : "100px" },
|
||||||
/* ISRC Number */ { "sTitle" : $.i18n._("ISRC") , "mDataProp" : "isrc_number" , "bVisible" : false , "sClass" : "library_isrc" , "sWidth" : "150px" },
|
/* ISRC Number */ { "sTitle" : $.i18n._("ISRC") , "mDataProp" : "isrc_number" , "bVisible" : false , "sClass" : "library_isrc" , "sWidth" : "150px" },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue