Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
9b52115abc
5 changed files with 30 additions and 31 deletions
|
@ -6,6 +6,7 @@ define('AIRTIME_API_VERSION', '1.0');
|
||||||
|
|
||||||
// Metadata Keys for files
|
// Metadata Keys for files
|
||||||
define('MDATA_KEY_FILEPATH', 'filepath');
|
define('MDATA_KEY_FILEPATH', 'filepath');
|
||||||
|
define('MDATA_KEY_DIRECTORY', 'directory');
|
||||||
define('MDATA_KEY_MD5', 'md5');
|
define('MDATA_KEY_MD5', 'md5');
|
||||||
define('MDATA_KEY_TITLE', 'track_title');
|
define('MDATA_KEY_TITLE', 'track_title');
|
||||||
define('MDATA_KEY_CREATOR', 'artist_name');
|
define('MDATA_KEY_CREATOR', 'artist_name');
|
||||||
|
|
|
@ -218,6 +218,13 @@ class LibraryController extends Zend_Controller_Action
|
||||||
$this->view->type = $type;
|
$this->view->type = $type;
|
||||||
$md = $file->getMetadata();
|
$md = $file->getMetadata();
|
||||||
|
|
||||||
|
foreach ($md as $key => $value) {
|
||||||
|
if ($key == 'MDATA_KEY_DIRECTORY') {
|
||||||
|
$musicDir = Application_Model_MusicDir::getDirByPK($value);
|
||||||
|
$md['MDATA_KEY_FILEPATH'] = $musicDir->getDirectory() . $md['MDATA_KEY_FILEPATH'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$formatter = new SamplerateFormatter($md["MDATA_KEY_SAMPLERATE"]);
|
$formatter = new SamplerateFormatter($md["MDATA_KEY_SAMPLERATE"]);
|
||||||
$md["MDATA_KEY_SAMPLERATE"] = $formatter->format();
|
$md["MDATA_KEY_SAMPLERATE"] = $formatter->format();
|
||||||
|
|
||||||
|
|
|
@ -225,21 +225,9 @@ class Application_Model_StoredFile {
|
||||||
foreach ($c['user'] as $constant => $value) {
|
foreach ($c['user'] as $constant => $value) {
|
||||||
if (preg_match('/^MDATA_KEY/', $constant)) {
|
if (preg_match('/^MDATA_KEY/', $constant)) {
|
||||||
if (isset($this->_dbMD[$value])) {
|
if (isset($this->_dbMD[$value])) {
|
||||||
if ($value == 'filepath') {
|
|
||||||
$directoryPK = $this->getDbColMetadataValue('directory');
|
|
||||||
if ($directoryPK == 1) {
|
|
||||||
$musicDir = Application_Model_MusicDir::getDirByPK($directoryPK);
|
|
||||||
$md[$constant] = $musicDir->getDirectory() . $this->getDbColMetadataValue($value);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$md[$constant] = $this->getDbColMetadataValue($value);
|
$md[$constant] = $this->getDbColMetadataValue($value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$md[$constant] = $this->getDbColMetadataValue($value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $md;
|
return $md;
|
||||||
|
|
|
@ -91,7 +91,7 @@ function updateProgressBarValue(){
|
||||||
songPercentDone = 0;
|
songPercentDone = 0;
|
||||||
currentSong = null;
|
currentSong = null;
|
||||||
} else {
|
} else {
|
||||||
if (currentShow.length > 0){
|
if (currentSong.media_item_played == true && currentShow.length > 0){
|
||||||
scheduled_play_line_to_switch.attr("class", "line-to-switch on");
|
scheduled_play_line_to_switch.attr("class", "line-to-switch on");
|
||||||
scheduled_play_div.addClass("ready")
|
scheduled_play_div.addClass("ready")
|
||||||
scheduled_play_source = true;
|
scheduled_play_source = true;
|
||||||
|
|
|
@ -214,27 +214,27 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
/* ftype */ {"sTitle": "", "mDataProp": "ftype", "bSearchable": false, "bVisible": false},
|
/* ftype */ {"sTitle": "", "mDataProp": "ftype", "bSearchable": false, "bVisible": false},
|
||||||
/* Checkbox */ {"sTitle": "", "mDataProp": "checkbox", "bSortable": false, "bSearchable": false, "sWidth": "25px", "sClass": "library_checkbox"},
|
/* Checkbox */ {"sTitle": "", "mDataProp": "checkbox", "bSortable": false, "bSearchable": false, "sWidth": "25px", "sClass": "library_checkbox"},
|
||||||
/* Type */ {"sTitle": "", "mDataProp": "image", "bSearchable": false, "sWidth": "25px", "sClass": "library_type", "iDataSort": 0},
|
/* Type */ {"sTitle": "", "mDataProp": "image", "bSearchable": false, "sWidth": "25px", "sClass": "library_type", "iDataSort": 0},
|
||||||
/* Title */ {"sTitle": "Title", "mDataProp": "track_title", "sClass": "library_title"},
|
/* Title */ {"sTitle": "Title", "mDataProp": "track_title", "sClass": "library_title", "sWidth": "170px"},
|
||||||
/* Creator */ {"sTitle": "Creator", "mDataProp": "artist_name", "sClass": "library_creator"},
|
/* Creator */ {"sTitle": "Creator", "mDataProp": "artist_name", "sClass": "library_creator", "sWidth": "160px"},
|
||||||
/* Album */ {"sTitle": "Album", "mDataProp": "album_title", "sClass": "library_album"},
|
/* Album */ {"sTitle": "Album", "mDataProp": "album_title", "sClass": "library_album", "sWidth": "150px"},
|
||||||
/* Genre */ {"sTitle": "Genre", "mDataProp": "genre", "sClass": "library_genre"},
|
/* Genre */ {"sTitle": "Genre", "mDataProp": "genre", "sClass": "library_genre", "sWidth": "100px"},
|
||||||
/* Year */ {"sTitle": "Year", "mDataProp": "year", "sClass": "library_year", "sWidth": "60px"},
|
/* Year */ {"sTitle": "Year", "mDataProp": "year", "sClass": "library_year", "sWidth": "60px"},
|
||||||
/* Length */ {"sTitle": "Length", "mDataProp": "length", "sClass": "library_length", "sWidth": "80px"},
|
/* Length */ {"sTitle": "Length", "mDataProp": "length", "sClass": "library_length", "sWidth": "80px"},
|
||||||
/* Upload Time */ {"sTitle": "Uploaded", "mDataProp": "utime", "sClass": "library_upload_time"},
|
/* Upload Time */ {"sTitle": "Uploaded", "mDataProp": "utime", "sClass": "library_upload_time", "sWidth": "125px"},
|
||||||
/* Last Modified */ {"sTitle": "Last Modified", "mDataProp": "mtime", "bVisible": false, "sClass": "library_modified_time"},
|
/* Last Modified */ {"sTitle": "Last Modified", "mDataProp": "mtime", "bVisible": false, "sClass": "library_modified_time", "sWidth": "125px"},
|
||||||
/* Track Number */ {"sTitle": "Track", "mDataProp": "track_number", "bSearchable": false, "bVisible": false, "sClass": "library_track", "sWidth": "65px"},
|
/* Track Number */ {"sTitle": "Track", "mDataProp": "track_number", "bSearchable": false, "bVisible": false, "sClass": "library_track", "sWidth": "65px"},
|
||||||
/* Mood */ {"sTitle": "Mood", "mDataProp": "mood", "bSearchable": false, "bVisible": false, "sClass": "library_mood"},
|
/* Mood */ {"sTitle": "Mood", "mDataProp": "mood", "bSearchable": false, "bVisible": false, "sClass": "library_mood", "sWidth": "70px"},
|
||||||
/* BPM */ {"sTitle": "BPM", "mDataProp": "bpm", "bSearchable": false, "bVisible": false, "sClass": "library_bpm"},
|
/* BPM */ {"sTitle": "BPM", "mDataProp": "bpm", "bSearchable": false, "bVisible": false, "sClass": "library_bpm", "sWidth": "50px"},
|
||||||
/* Composer */ {"sTitle": "Composer", "mDataProp": "composer", "bSearchable": false, "bVisible": false, "sClass": "library_composer"},
|
/* Composer */ {"sTitle": "Composer", "mDataProp": "composer", "bSearchable": false, "bVisible": false, "sClass": "library_composer", "sWidth": "150px"},
|
||||||
/* Website */ {"sTitle": "Website", "mDataProp": "info_url", "bSearchable": false, "bVisible": false, "sClass": "library_url"},
|
/* Website */ {"sTitle": "Website", "mDataProp": "info_url", "bSearchable": false, "bVisible": false, "sClass": "library_url", "sWidth": "150px"},
|
||||||
/* Bit Rate */ {"sTitle": "Bit Rate", "mDataProp": "bit_rate", "bSearchable": false, "bVisible": false, "sClass": "library_bitrate", "sWidth": "80px"},
|
/* Bit Rate */ {"sTitle": "Bit Rate", "mDataProp": "bit_rate", "bSearchable": false, "bVisible": false, "sClass": "library_bitrate", "sWidth": "80px"},
|
||||||
/* Sample Rate */ {"sTitle": "Sample", "mDataProp": "sample_rate", "bSearchable": false, "bVisible": false, "sClass": "library_sr", "sWidth": "80px"},
|
/* Sample Rate */ {"sTitle": "Sample", "mDataProp": "sample_rate", "bSearchable": false, "bVisible": false, "sClass": "library_sr", "sWidth": "80px"},
|
||||||
/* ISRC Number */ {"sTitle": "ISRC", "mDataProp": "isrc_number", "bSearchable": false, "bVisible": false, "sClass": "library_isrc"},
|
/* ISRC Number */ {"sTitle": "ISRC", "mDataProp": "isrc_number", "bSearchable": false, "bVisible": false, "sClass": "library_isrc", "sWidth": "150px"},
|
||||||
/* Encoded */ {"sTitle": "Encoded", "mDataProp": "encoded_by", "bSearchable": false, "bVisible": false, "sClass": "library_encoded"},
|
/* Encoded */ {"sTitle": "Encoded", "mDataProp": "encoded_by", "bSearchable": false, "bVisible": false, "sClass": "library_encoded", "sWidth": "150px"},
|
||||||
/* Label */ {"sTitle": "Label", "mDataProp": "label", "bSearchable": false, "bVisible": false, "sClass": "library_label"},
|
/* Label */ {"sTitle": "Label", "mDataProp": "label", "bSearchable": false, "bVisible": false, "sClass": "library_label", "sWidth": "125px"},
|
||||||
/* Copyright */ {"sTitle": "Copyright", "mDataProp": "copyright", "bSearchable": false, "bVisible": false, "sClass": "library_copyright"},
|
/* Copyright */ {"sTitle": "Copyright", "mDataProp": "copyright", "bSearchable": false, "bVisible": false, "sClass": "library_copyright", "sWidth": "125px"},
|
||||||
/* Mime */ {"sTitle": "Mime", "mDataProp": "mime", "bSearchable": false, "bVisible": false, "sClass": "library_mime"},
|
/* Mime */ {"sTitle": "Mime", "mDataProp": "mime", "bSearchable": false, "bVisible": false, "sClass": "library_mime", "sWidth": "80px"},
|
||||||
/* Language */ {"sTitle": "Language", "mDataProp": "language", "bSearchable": false, "bVisible": false, "sClass": "library_language"}
|
/* Language */ {"sTitle": "Language", "mDataProp": "language", "bSearchable": false, "bVisible": false, "sClass": "library_language", "sWidth": "125px"}
|
||||||
],
|
],
|
||||||
|
|
||||||
"bProcessing": true,
|
"bProcessing": true,
|
||||||
|
@ -242,6 +242,9 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
|
|
||||||
"aLengthMenu": [[5, 10, 15, 20, 25, 50, 100], [5, 10, 15, 20, 25, 50, 100]],
|
"aLengthMenu": [[5, 10, 15, 20, 25, 50, 100], [5, 10, 15, 20, 25, 50, 100]],
|
||||||
|
|
||||||
|
//"sScrollX": "100%",
|
||||||
|
//"sScrollXInner": "110%",
|
||||||
|
|
||||||
"bStateSave": true,
|
"bStateSave": true,
|
||||||
"fnStateSaveParams": function (oSettings, oData) {
|
"fnStateSaveParams": function (oSettings, oData) {
|
||||||
//remove oData components we don't want to save.
|
//remove oData components we don't want to save.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue