Generate artwork images for audio using ID3.
This commit is contained in:
parent
24dd71ad33
commit
45dbf84750
|
@ -58,6 +58,11 @@ Linked code:
|
|||
- License: MIT
|
||||
- Compatible with the GPL: Yes. See http://www.gnu.org/licenses/license-list.html
|
||||
|
||||
* getID3()
|
||||
- What is it: PHP script that extracts useful information from MP3s & other multimedia file formats:
|
||||
- Web site: https://github.com/JamesHeinrich/getID3
|
||||
- License: GPLv3
|
||||
|
||||
Non-linked code:
|
||||
* Apache Web Server 2.2
|
||||
- Web site: http://httpd.apache.org/
|
||||
|
|
|
@ -68,4 +68,275 @@ class FileDataHelper {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets data URI from artwork file
|
||||
*
|
||||
* @param string $file
|
||||
* @param int $size
|
||||
* @param string $filepath
|
||||
*
|
||||
* @return string Data URI for artwork
|
||||
*/
|
||||
public static function getArtworkData($file, $size, $filepath = false)
|
||||
{
|
||||
$baseUrl = Application_Common_HTTPHelper::getStationUrl();
|
||||
$default = $baseUrl . "css/images/no-cover.jpg";
|
||||
|
||||
if ($filepath != false) {
|
||||
$path = $filepath . $file . "-" . $size;
|
||||
if (!file_exists($path)) {
|
||||
$get_file_content = $default;
|
||||
} else {
|
||||
$get_file_content = file_get_contents($path);
|
||||
}
|
||||
} else {
|
||||
$storDir = Application_Model_MusicDir::getStorDir();
|
||||
$path = $storDir->getDirectory() . $file . "-" . $size;
|
||||
if (!file_exists($path)) {
|
||||
$get_file_content = $default;
|
||||
} else {
|
||||
$get_file_content = file_get_contents($path);
|
||||
}
|
||||
}
|
||||
return $get_file_content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add artwork file
|
||||
*
|
||||
* @param string $analyzeFile
|
||||
* @param string $filename
|
||||
* @param string $importDir
|
||||
* @param string $DbPath
|
||||
*
|
||||
* @return string Path to artwork
|
||||
*/
|
||||
public static function saveArtworkData($analyzeFile, $filename, $importDir = null, $DbPath = null)
|
||||
{
|
||||
$getID3 = new \getID3();
|
||||
$getFileInfo = $getID3->analyze($analyzeFile);
|
||||
|
||||
if(isset($getFileInfo['comments']['picture'][0])) {
|
||||
|
||||
$get_img = "";
|
||||
$timestamp = time();
|
||||
$mime = $getFileInfo['comments']['picture'][0]['image_mime'];
|
||||
$Image = 'data:'.$mime.';charset=utf-8;base64,'.base64_encode($getFileInfo['comments']['picture'][0]['data']);
|
||||
$base64 = @$Image;
|
||||
|
||||
if (!file_exists($importDir . "/" . "artwork/")) {
|
||||
if (!mkdir($importDir . "/" . "artwork/", 0777, true)) {
|
||||
Logging::error("Failed to create artwork directory.");
|
||||
throw new Exception("Failed to create artwork directory.");
|
||||
}
|
||||
}
|
||||
|
||||
$path_parts = pathinfo($filename);
|
||||
$file = $importDir . "artwork/" . $path_parts['filename'];
|
||||
|
||||
//Save Data URI
|
||||
if (file_put_contents($file, $base64)) {
|
||||
$get_img = $DbPath . "artwork/". $path_parts['filename'];
|
||||
} else {
|
||||
Logging::error("Could not save Data URI");
|
||||
}
|
||||
|
||||
if ($mime == "image/png") {
|
||||
$ext = 'png';
|
||||
} elseif ($mime == "image/gif") {
|
||||
$ext = 'gif';
|
||||
} elseif ($mime == "image/bmp") {
|
||||
$ext = 'bmp';
|
||||
} else {
|
||||
$ext = 'jpg';
|
||||
}
|
||||
|
||||
if (file_exists($file)) {
|
||||
self::resizeImage($file, $file . '-32.jpg', $ext, 32, 100);
|
||||
self::resizeImage($file, $file . '-64.jpg', $ext, 64, 100);
|
||||
self::resizeImage($file, $file . '-128.jpg', $ext, 128, 100);
|
||||
self::resizeImage($file, $file . '-256.jpg', $ext, 256, 100);
|
||||
self::resizeImage($file, $file . '-512.jpg', $ext, 512, 100);
|
||||
self::imgToDataURI($file . '-32.jpg', $file . '-32');
|
||||
self::imgToDataURI($file . '-64.jpg', $file . '-64');
|
||||
self::imgToDataURI($file . '-128.jpg', $file . '-128');
|
||||
self::imgToDataURI($file . '-256.jpg', $file . '-256');
|
||||
} else {
|
||||
Logging::error("The file $file does not exist");
|
||||
}
|
||||
} else {
|
||||
$get_img = '';
|
||||
}
|
||||
return $get_img;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset artwork
|
||||
*
|
||||
* @param string $trackid
|
||||
*
|
||||
* @return string $get_img Path to artwork
|
||||
*/
|
||||
public static function resetArtwork($trackid)
|
||||
{
|
||||
$file = Application_Model_StoredFile::RecallById($trackid);
|
||||
$md = $file->getMetadata();
|
||||
|
||||
$storDir = Application_Model_MusicDir::getStorDir();
|
||||
$fp = $storDir->getDirectory();
|
||||
|
||||
$dbAudioPath = $md["MDATA_KEY_FILEPATH"];
|
||||
$fullpath = $fp . $dbAudioPath;
|
||||
|
||||
$getID3 = new \getID3();
|
||||
$getFileInfo = $getID3->analyze($fullpath);
|
||||
|
||||
if(isset($getFileInfo['comments']['picture'][0])) {
|
||||
|
||||
$get_img = "";
|
||||
$mime = $getFileInfo['comments']['picture'][0]['image_mime'];
|
||||
$Image = 'data:'.$getFileInfo['comments']['picture'][0]['image_mime'].';charset=utf-8;base64,'.base64_encode($getFileInfo['comments']['picture'][0]['data']);
|
||||
$base64 = @$Image;
|
||||
|
||||
$audioPath = dirname($fullpath);
|
||||
$dbPath = dirname($dbAudioPath);
|
||||
$path_parts = pathinfo($fullpath);
|
||||
$file = $path_parts['filename'];
|
||||
|
||||
//Save Data URI
|
||||
if (file_put_contents($audioPath . "/" . $file, $base64)) {
|
||||
$get_img = $dbPath . "/" . $file;
|
||||
} else {
|
||||
Logging::error("Could not save Data URI");
|
||||
}
|
||||
|
||||
$rfile = $audioPath . "/" . $file;
|
||||
|
||||
if ($mime == "image/png") {
|
||||
$ext = 'png';
|
||||
} elseif ($mime == "image/gif") {
|
||||
$ext = 'gif';
|
||||
} elseif ($mime == "image/bmp") {
|
||||
$ext = 'bmp';
|
||||
} else {
|
||||
$ext = 'jpg';
|
||||
}
|
||||
|
||||
if (file_exists($rfile)) {
|
||||
self::resizeImage($rfile, $rfile . '-32.jpg', $ext, 32, 100);
|
||||
self::resizeImage($rfile, $rfile . '-64.jpg', $ext, 64, 100);
|
||||
self::resizeImage($rfile, $rfile . '-128.jpg', $ext, 128, 100);
|
||||
self::resizeImage($rfile, $rfile . '-256.jpg', $ext, 256, 100);
|
||||
self::resizeImage($rfile, $rfile . '-512.jpg', $ext, 512, 100);
|
||||
self::imgToDataURI($rfile . '-32.jpg', $rfile . '-32');
|
||||
self::imgToDataURI($rfile . '-64.jpg', $rfile . '-64');
|
||||
self::imgToDataURI($rfile . '-128.jpg', $rfile . '-128');
|
||||
self::imgToDataURI($rfile . '-256.jpg', $rfile . '-256');
|
||||
} else {
|
||||
Logging::error("The file $rfile does not exist");
|
||||
}
|
||||
} else {
|
||||
$get_img = "";
|
||||
}
|
||||
return $get_img;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render image
|
||||
* Used in API to render JPEG
|
||||
*
|
||||
* @param string $file
|
||||
*/
|
||||
public static function renderImage($file)
|
||||
{
|
||||
$im = @imagecreatefromjpeg($file);
|
||||
header('Content-Type: image/jpeg');
|
||||
$img = $im;
|
||||
imagejpeg($img);
|
||||
imagedestroy($img);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render Data URI
|
||||
* Used in API to render Data URI
|
||||
*
|
||||
* @param string $dataFile
|
||||
*/
|
||||
public static function renderDataURI($dataFile)
|
||||
{
|
||||
if($filecontent = file_get_contents($dataFile) !== false){
|
||||
$image = @file_get_contents($dataFile);
|
||||
$image = base64_encode($image);
|
||||
if (!$image || $image === '') {
|
||||
return;
|
||||
}
|
||||
$blob = base64_decode($image);
|
||||
$f = finfo_open();
|
||||
$mime_type = finfo_buffer($f, $blob, FILEINFO_MIME_TYPE);
|
||||
finfo_close($f);
|
||||
header("Content-Type: " . $mime_type);
|
||||
echo $blob;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Resize Image
|
||||
*
|
||||
* @param string $orig_filename
|
||||
* @param string $converted_filename
|
||||
* @param string $ext
|
||||
* @param string $size Default: 500
|
||||
* @param string $quality Default: 75
|
||||
*
|
||||
*/
|
||||
public static function resizeImage($orig_filename, $converted_filename, $ext, $size=500, $quality=75)
|
||||
{
|
||||
$get_cont = file_get_contents($orig_filename);
|
||||
if ($ext == "png") {
|
||||
$im = @imagecreatefrompng($get_cont);
|
||||
} elseif ($ext == "gif") {
|
||||
$im = @imagecreatefromgif($get_cont);
|
||||
} else {
|
||||
$im = @imagecreatefromjpeg($get_cont);
|
||||
}
|
||||
|
||||
if ($size){
|
||||
$im = imagescale($im , $size);
|
||||
}
|
||||
|
||||
if(!$im) {
|
||||
$im = imagecreatetruecolor(150, 30);
|
||||
$bgc = imagecolorallocate($im, 255, 255, 255);
|
||||
$tc = imagecolorallocate($im, 0, 0, 0);
|
||||
imagefilledrectangle($im, 0, 0, 150, 30, $bgc);
|
||||
imagestring($im, 1, 5, 5, 'Error loading ' . $imgname, $tc);
|
||||
}
|
||||
|
||||
$img = $im;
|
||||
imagejpeg($img, $converted_filename, $quality);
|
||||
imagedestroy($img);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert image to Data URI
|
||||
*
|
||||
* @param string $orig_filename
|
||||
* @param string $conv_filename
|
||||
*/
|
||||
public static function imgToDataURI($orig_filename, $conv_filename)
|
||||
{
|
||||
$file = file_get_contents($orig_filename);
|
||||
$Image = 'data:image/jpeg;charset=utf-8;base64,'.base64_encode($file);
|
||||
$base64 = @$Image;
|
||||
|
||||
//Save Data URI
|
||||
if (file_put_contents($conv_filename, $base64)) {
|
||||
|
||||
} else {
|
||||
Logging::error("Could not save Data URI");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -81,6 +81,8 @@ define('MDATA_KEY_REPLAYGAIN' , 'replay_gain');
|
|||
define('MDATA_KEY_OWNER_ID' , 'owner_id');
|
||||
define('MDATA_KEY_CUE_IN' , 'cuein');
|
||||
define('MDATA_KEY_CUE_OUT' , 'cueout');
|
||||
define('MDATA_KEY_ARTWORK' , 'artwork');
|
||||
define('MDATA_KEY_ARTWORK_DATA', 'artwork_data');
|
||||
|
||||
define('UI_MDATA_VALUE_FORMAT_FILE' , 'File');
|
||||
define('UI_MDATA_VALUE_FORMAT_STREAM' , 'live stream');
|
||||
|
|
|
@ -26,6 +26,7 @@ class ApiController extends Zend_Controller_Action
|
|||
"show-tracks",
|
||||
"show-schedules",
|
||||
"show-logo",
|
||||
"track",
|
||||
"stream-m3u"
|
||||
);
|
||||
|
||||
|
@ -294,6 +295,20 @@ class ApiController extends Zend_Controller_Action
|
|||
$result = Application_Model_Schedule::GetPlayOrderRangeOld($limit);
|
||||
}
|
||||
|
||||
$stationUrl = Application_Common_HTTPHelper::getStationUrl();
|
||||
|
||||
$previousID = $result["previous"]["metadata"]["id"];
|
||||
$get_prev_artwork_url = $stationUrl . 'api/track?id='. $previousID .'&return=artwork';
|
||||
$result["previous"]["metadata"]["artwork_url"] = $get_prev_artwork_url;
|
||||
|
||||
$currID = $result["current"]["metadata"]["id"];
|
||||
$get_curr_artwork_url = $stationUrl . 'api/track?id='. $currID .'&return=artwork';
|
||||
$result["current"]["metadata"]["artwork_url"] = $get_curr_artwork_url;
|
||||
|
||||
$nextID = $result["previous"]["metadata"]["id"];
|
||||
$get_next_artwork_url = $stationUrl . 'api/track?id='. $nextID .'&return=artwork';
|
||||
$result["previous"]["metadata"]["artwork_url"] = $get_next_artwork_url;
|
||||
|
||||
// apply user-defined timezone, or default to station
|
||||
Application_Common_DateHelper::convertTimestampsToTimezone(
|
||||
$result['currentShow'],
|
||||
|
@ -523,6 +538,103 @@ class ApiController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* New API endpoint to display metadata from any single track
|
||||
*
|
||||
* Find metadata to any track imported (eg. id=1&return=json)
|
||||
*
|
||||
* @param int $id track ID
|
||||
* @param string $return json, artwork_data, or artwork
|
||||
*
|
||||
*/
|
||||
public function trackAction()
|
||||
{
|
||||
// Disable the view and the layout
|
||||
$this->view->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
if (Application_Model_Preference::GetAllow3rdPartyApi() || $this->checkAuth()) {
|
||||
|
||||
$request = $this->getRequest();
|
||||
$trackid = $request->getParam('id');
|
||||
$return = $request->getParam('return');
|
||||
|
||||
if (empty($return)) {
|
||||
throw new ZendActionHttpException($this, 400, "ERROR: No return was given.");
|
||||
}
|
||||
|
||||
if (empty($trackid)) {
|
||||
throw new ZendActionHttpException($this, 400, "ERROR: No ID was given.");
|
||||
}
|
||||
|
||||
$storDir = Application_Model_MusicDir::getStorDir();
|
||||
$fp = $storDir->getDirectory();
|
||||
|
||||
//$this->view->type = $type;
|
||||
$file = Application_Model_StoredFile::RecallById($trackid);
|
||||
$md = $file->getMetadata();
|
||||
|
||||
if ($return === "artwork-data") {
|
||||
foreach ($md as $key => $value) {
|
||||
if ($key == 'MDATA_KEY_ARTWORK' && !is_null($value)) {
|
||||
FileDataHelper::renderDataURI($fp . $md['MDATA_KEY_ARTWORK']);
|
||||
}
|
||||
}
|
||||
} elseif ($return === "artwork-data-32") {
|
||||
foreach ($md as $key => $value) {
|
||||
if ($key == 'MDATA_KEY_ARTWORK' && !is_null($value)) {
|
||||
FileDataHelper::renderDataURI($fp . $md['MDATA_KEY_ARTWORK']. '-32');
|
||||
}
|
||||
}
|
||||
} elseif ($return === "artwork") {
|
||||
//default
|
||||
foreach ($md as $key => $value) {
|
||||
if ($key == 'MDATA_KEY_ARTWORK' && !is_null($value)) {
|
||||
FileDataHelper::renderImage($fp . $md['MDATA_KEY_ARTWORK'].'-1024.jpg');
|
||||
}
|
||||
}
|
||||
} elseif ($return === "artwork-32") {
|
||||
foreach ($md as $key => $value) {
|
||||
if ($key == 'MDATA_KEY_ARTWORK' && !is_null($value)) {
|
||||
FileDataHelper::renderImage($fp . $md['MDATA_KEY_ARTWORK'].'-32.jpg');
|
||||
}
|
||||
}
|
||||
} elseif ($return === "artwork-64") {
|
||||
foreach ($md as $key => $value) {
|
||||
if ($key == 'MDATA_KEY_ARTWORK' && !is_null($value)) {
|
||||
FileDataHelper::renderImage($fp . $md['MDATA_KEY_ARTWORK'].'-64.jpg');
|
||||
}
|
||||
}
|
||||
} elseif ($return === "artwork-128") {
|
||||
foreach ($md as $key => $value) {
|
||||
if ($key == 'MDATA_KEY_ARTWORK' && !is_null($value)) {
|
||||
FileDataHelper::renderImage($fp . $md['MDATA_KEY_ARTWORK'].'-128.jpg');
|
||||
}
|
||||
}
|
||||
} elseif ($return === "artwork-512") {
|
||||
foreach ($md as $key => $value) {
|
||||
if ($key == 'MDATA_KEY_ARTWORK' && !is_null($value)) {
|
||||
FileDataHelper::renderImage($fp . $md['MDATA_KEY_ARTWORK'].'-512.jpg');
|
||||
}
|
||||
}
|
||||
} elseif ($return === "artwork-1024") {
|
||||
foreach ($md as $key => $value) {
|
||||
if ($key == 'MDATA_KEY_ARTWORK' && !is_null($value)) {
|
||||
FileDataHelper::renderImage($fp . $md['MDATA_KEY_ARTWORK'].'-1024.jpg');
|
||||
}
|
||||
}
|
||||
} elseif ($return === "json") {
|
||||
$data =json_encode($md);
|
||||
echo $data;
|
||||
}
|
||||
|
||||
} else {
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
print _('You are not allowed to access this resource. ');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* API endpoint to provide station metadata
|
||||
*/
|
||||
|
|
|
@ -392,8 +392,15 @@ class LibraryController extends Zend_Controller_Action
|
|||
$serialized = array();
|
||||
//need to convert from serialized jQuery array.
|
||||
foreach ($js as $j) {
|
||||
//on edit, if no artwork is set and audiofile has image, automatically add it
|
||||
if ($j["name"] == "artwork") {
|
||||
if ($j["value"] == null || $j["value"] == ''){
|
||||
$serialized["artwork"] = FileDataHelper::resetArtwork($file_id);
|
||||
}
|
||||
} else {
|
||||
$serialized[$j["name"]] = $j["value"];
|
||||
}
|
||||
}
|
||||
|
||||
// Sanitize any wildly incorrect metadata before it goes to be validated.
|
||||
FileDataHelper::sanitizeData($serialized);
|
||||
|
@ -409,6 +416,9 @@ class LibraryController extends Zend_Controller_Action
|
|||
$this->view->form = $form;
|
||||
$this->view->id = $file_id;
|
||||
$this->view->title = $file->getPropelOrm()->getDbTrackTitle();
|
||||
$this->view->artist_name = $file->getPropelOrm()->getDbArtistName();
|
||||
$this->view->filePath = $file->getPropelOrm()->getDbFilepath();
|
||||
$this->view->artwork = $file->getPropelOrm()->getDbArtwork();
|
||||
$this->view->html = $this->view->render('library/edit-file-md.phtml');
|
||||
}
|
||||
|
||||
|
|
|
@ -302,6 +302,8 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$range["previous"]["ends"] = Application_Common_DateHelper::UTCStringToUserTimezoneString($range["previous"]["ends"]);
|
||||
}
|
||||
if (isset($range["current"])) {
|
||||
$get_artwork = FileDataHelper::getArtworkData($range["current"]["metadata"]["artwork"], 256);
|
||||
$range["current"]["metadata"]["artwork_data"] = $get_artwork;
|
||||
$range["current"]["starts"] = Application_Common_DateHelper::UTCStringToUserTimezoneString($range["current"]["starts"]);
|
||||
$range["current"]["ends"] = Application_Common_DateHelper::UTCStringToUserTimezoneString($range["current"]["ends"]);
|
||||
}
|
||||
|
|
|
@ -139,6 +139,8 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
|
|||
$view->headScript()->appendScript("var PRODUCT_NAME = '" . PRODUCT_NAME . "';");
|
||||
$view->headScript()->appendScript("var USER_MANUAL_URL = '" . USER_MANUAL_URL . "';");
|
||||
$view->headScript()->appendScript("var COMPANY_NAME = '" . COMPANY_NAME . "';");
|
||||
//Each page refresh or tab open has uniqID, not to be used for security
|
||||
$view->headScript()->appendScript("var UNIQID = '" . uniqid() . "';");
|
||||
}
|
||||
|
||||
protected function _initHeadLink()
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE cc_files ADD COLUMN artwork TYPE character varying(255);
|
|
@ -18,6 +18,17 @@ class Application_Form_EditAudioMD extends Zend_Form
|
|||
$file_id->setAttrib('class', 'obj_id');
|
||||
$this->addElement($file_id);
|
||||
|
||||
// Add artwork hidden field
|
||||
$artwork = new Zend_Form_Element_Hidden('artwork');
|
||||
$artwork->setFilters(array('StringTrim'))
|
||||
->setValidators(array(
|
||||
new Zend_Validate_StringLength(array('max' => 512))
|
||||
));
|
||||
$file_id->addDecorator('HtmlTag', array('tag' => 'div', 'style' => 'display:none'));
|
||||
$file_id->removeDecorator('Label');
|
||||
$file_id->setAttrib('class', 'artwork');
|
||||
$this->addElement($artwork);
|
||||
|
||||
// Add title field
|
||||
$track_title = new Zend_Form_Element_Text('track_title');
|
||||
$track_title->class = 'input_text';
|
||||
|
|
|
@ -70,6 +70,7 @@ class Application_Model_Dashboard
|
|||
*/
|
||||
|
||||
return array("name"=>$row[0]["artist_name"]." - ".$row[0]["track_title"],
|
||||
"artwork_data"=>$row[0]["artwork_data"],
|
||||
"starts"=>$row[0]["starts"],
|
||||
"ends"=>$row[0]["ends"]);
|
||||
}
|
||||
|
@ -87,6 +88,7 @@ class Application_Model_Dashboard
|
|||
}
|
||||
} else {
|
||||
return array("name"=>$row[0]["artist_name"]." - ".$row[0]["track_title"],
|
||||
"artwork_data"=>$row[0]["artwork_data"],
|
||||
"starts"=>$row[0]["starts"],
|
||||
"ends"=>$row[0]["ends"],
|
||||
"media_item_played"=>$row[0]["media_item_played"],
|
||||
|
@ -110,6 +112,7 @@ class Application_Model_Dashboard
|
|||
return null;
|
||||
} else {
|
||||
return array("name"=>$row[0]["artist_name"]." - ".$row[0]["track_title"],
|
||||
"artwork_data"=>$row[0]["artwork_data"],
|
||||
"starts"=>$row[0]["starts"],
|
||||
"ends"=>$row[0]["ends"]);
|
||||
}
|
||||
|
@ -128,6 +131,7 @@ class Application_Model_Dashboard
|
|||
|
||||
if ($row[0]["starts"] <= $showInstance->getShowInstanceStart()) {
|
||||
return array("name"=>$row[0]["artist_name"]." - ".$row[0]["track_title"],
|
||||
"artwork_data"=>$row[0]["artwork_data"],
|
||||
"starts"=>$row[0]["starts"],
|
||||
"ends"=>$row[0]["ends"]);
|
||||
} else {
|
||||
|
|
|
@ -53,7 +53,8 @@ class Application_Model_StoredFile
|
|||
"owner_id" => "DbOwnerId",
|
||||
"cuein" => "DbCueIn",
|
||||
"cueout" => "DbCueOut",
|
||||
"description" => "DbDescription"
|
||||
"description" => "DbDescription",
|
||||
"artwork" => "DbArtwork"
|
||||
);
|
||||
|
||||
function __construct($file, $con) {
|
||||
|
@ -671,7 +672,7 @@ SQL;
|
|||
"bit_rate", "sample_rate", "isrc_number", "encoded_by", "label",
|
||||
"copyright", "mime", "language", "filepath", "owner_id",
|
||||
"conductor", "replay_gain", "lptime", "is_playlist", "is_scheduled",
|
||||
"cuein", "cueout", "description" );
|
||||
"cuein", "cueout", "description", "artwork" );
|
||||
}
|
||||
|
||||
public static function searchLibraryFiles($datatables)
|
||||
|
@ -829,6 +830,9 @@ SQL;
|
|||
$displayTimezone = new DateTimeZone(Application_Model_Preference::GetUserTimezone());
|
||||
$utcTimezone = new DateTimeZone("UTC");
|
||||
|
||||
$storDir = Application_Model_MusicDir::getStorDir();
|
||||
$fp = $storDir->getDirectory();
|
||||
|
||||
foreach ($results['aaData'] as &$row) {
|
||||
$row['id'] = intval($row['id']);
|
||||
|
||||
|
@ -862,6 +866,9 @@ SQL;
|
|||
$formatter = new BitrateFormatter($row['bit_rate']);
|
||||
$row['bit_rate'] = $formatter->format();
|
||||
|
||||
$get_artwork = FileDataHelper::getArtworkData($row['artwork'], 32, $fp);
|
||||
$row['artwork_data'] = $get_artwork;
|
||||
|
||||
// for audio preview
|
||||
$row['audioFile'] = $row['id'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION);
|
||||
|
||||
|
|
|
@ -146,10 +146,16 @@ class CcFiles extends BaseCcFiles {
|
|||
|
||||
self::validateFileArray($fileArray);
|
||||
|
||||
$storDir = Application_Model_MusicDir::getStorDir();
|
||||
$importedStorageDir = $storDir->getDirectory() . "imported/" . self::getOwnerId() . "/";
|
||||
$importedDbPath = "imported/" . self::getOwnerId() . "/";
|
||||
$artwork = FileDataHelper::saveArtworkData($filePath, $originalFilename, $importedStorageDir, $importedDbPath);
|
||||
|
||||
$file->fromArray($fileArray);
|
||||
$file->setDbOwnerId(self::getOwnerId());
|
||||
$now = new DateTime("now", new DateTimeZone("UTC"));
|
||||
$file->setDbTrackTitle($originalFilename);
|
||||
$file->setDbArtwork($artwork);
|
||||
$file->setDbUtime($now);
|
||||
$file->setDbHidden(true);
|
||||
$file->save();
|
||||
|
@ -408,6 +414,21 @@ class CcFiles extends BaseCcFiles {
|
|||
return Application_Common_OsPath::join($directory, $filepath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the artwork's absolute file path stored on disk.
|
||||
*/
|
||||
public function getAbsoluteArtworkPath()
|
||||
{
|
||||
$music_dir = Application_Model_MusicDir::getDirByPK($this->getDbDirectory());
|
||||
if (!$music_dir) {
|
||||
throw new Exception("Invalid music_dir for file " . $this->getDbId() . " in database.");
|
||||
}
|
||||
$directory = $music_dir->getDirectory();
|
||||
$filepath = $this->getDbArtwork();
|
||||
|
||||
return Application_Common_OsPath::join($directory, $filepath);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Strips out fields from incoming request data that should never be modified
|
||||
|
@ -503,8 +524,14 @@ class CcFiles extends BaseCcFiles {
|
|||
public function deletePhysicalFile()
|
||||
{
|
||||
$filepath = $this->getAbsoluteFilePath();
|
||||
$artworkpath = $this->getAbsoluteArtworkPath();
|
||||
if (file_exists($filepath)) {
|
||||
unlink($filepath);
|
||||
// also delete related images (dataURI and jpeg files)
|
||||
foreach (glob("$artworkpath*", GLOB_NOSORT) as $filename) {
|
||||
unlink($filename);
|
||||
}
|
||||
unlink($artworkpath);
|
||||
} else {
|
||||
throw new Exception("Could not locate file ".$filepath);
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ class CcFilesTableMap extends TableMap
|
|||
$this->addColumn('is_playlist', 'DbIsPlaylist', 'BOOLEAN', false, null, false);
|
||||
$this->addColumn('filesize', 'DbFilesize', 'INTEGER', true, null, 0);
|
||||
$this->addColumn('description', 'DbDescription', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('artwork', 'DbArtwork', 'VARCHAR', false, 512, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
|
|
|
@ -288,6 +288,12 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $info_url;
|
||||
|
||||
/**
|
||||
* The value for the artwork field.
|
||||
* @var string
|
||||
*/
|
||||
protected $artwork;
|
||||
|
||||
/**
|
||||
* The value for the artist_url field.
|
||||
* @var string
|
||||
|
@ -1176,6 +1182,17 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
return $this->info_url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [artwork] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDbArtwork()
|
||||
{
|
||||
|
||||
return $this->artwork;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [artist_url] column value.
|
||||
*
|
||||
|
@ -1838,6 +1855,26 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
return $this;
|
||||
} // setDbTrackTitle()
|
||||
|
||||
/**
|
||||
* Set the value of [artwork] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return CcFiles The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbArtwork($v)
|
||||
{
|
||||
if ($v !== null && is_numeric($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->artwork !== $v) {
|
||||
$this->artwork = $v;
|
||||
$this->modifiedColumns[] = CcFilesPeer::ARTWORK;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbArtwork()
|
||||
|
||||
/**
|
||||
* Set the value of [artist_name] column.
|
||||
*
|
||||
|
@ -3266,6 +3303,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$this->is_playlist = ($row[$startcol + 69] !== null) ? (boolean) $row[$startcol + 69] : null;
|
||||
$this->filesize = ($row[$startcol + 70] !== null) ? (int) $row[$startcol + 70] : null;
|
||||
$this->description = ($row[$startcol + 71] !== null) ? (string) $row[$startcol + 71] : null;
|
||||
$this->artwork = ($row[$startcol + 72] !== null) ? (string) $row[$startcol + 72] : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
@ -3903,6 +3941,9 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
if ($this->isColumnModified(CcFilesPeer::DESCRIPTION)) {
|
||||
$modifiedColumns[':p' . $index++] = '"description"';
|
||||
}
|
||||
if ($this->isColumnModified(CcFilesPeer::ARTWORK)) {
|
||||
$modifiedColumns[':p' . $index++] = '"artwork"';
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
'INSERT INTO "cc_files" (%s) VALUES (%s)',
|
||||
|
@ -4130,6 +4171,9 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
case '"description"':
|
||||
$stmt->bindValue($identifier, $this->description, PDO::PARAM_STR);
|
||||
break;
|
||||
case '"artwork"':
|
||||
$stmt->bindValue($identifier, $this->artwork, PDO::PARAM_STR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
$stmt->execute();
|
||||
|
@ -4561,6 +4605,9 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
case 71:
|
||||
return $this->getDbDescription();
|
||||
break;
|
||||
case 72:
|
||||
return $this->getDbArtwork();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
|
@ -4662,6 +4709,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$keys[69] => $this->getDbIsPlaylist(),
|
||||
$keys[70] => $this->getDbFilesize(),
|
||||
$keys[71] => $this->getDbDescription(),
|
||||
$keys[72] => $this->getDbArtwork(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||
|
@ -4952,6 +5000,9 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
case 71:
|
||||
$this->setDbDescription($value);
|
||||
break;
|
||||
case 72:
|
||||
$this->setDbArtwork($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
|
@ -5048,6 +5099,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
if (array_key_exists($keys[69], $arr)) $this->setDbIsPlaylist($arr[$keys[69]]);
|
||||
if (array_key_exists($keys[70], $arr)) $this->setDbFilesize($arr[$keys[70]]);
|
||||
if (array_key_exists($keys[71], $arr)) $this->setDbDescription($arr[$keys[71]]);
|
||||
if (array_key_exists($keys[72], $arr)) $this->setDbArtwork($arr[$keys[72]]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5131,6 +5183,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
if ($this->isColumnModified(CcFilesPeer::IS_PLAYLIST)) $criteria->add(CcFilesPeer::IS_PLAYLIST, $this->is_playlist);
|
||||
if ($this->isColumnModified(CcFilesPeer::FILESIZE)) $criteria->add(CcFilesPeer::FILESIZE, $this->filesize);
|
||||
if ($this->isColumnModified(CcFilesPeer::DESCRIPTION)) $criteria->add(CcFilesPeer::DESCRIPTION, $this->description);
|
||||
if ($this->isColumnModified(CcFilesPeer::ARTWORK)) $criteria->add(CcFilesPeer::ARTWORK, $this->artwork);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
@ -5265,6 +5318,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$copyObj->setDbIsPlaylist($this->getDbIsPlaylist());
|
||||
$copyObj->setDbFilesize($this->getDbFilesize());
|
||||
$copyObj->setDbDescription($this->getDbDescription());
|
||||
$copyObj->setDbArtwork($this->getDbArtwork());
|
||||
|
||||
if ($deepCopy && !$this->startCopy) {
|
||||
// important: temporarily setNew(false) because this affects the behavior of
|
||||
|
@ -7666,6 +7720,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$this->is_playlist = null;
|
||||
$this->filesize = null;
|
||||
$this->description = null;
|
||||
$this->artwork = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->alreadyInValidation = false;
|
||||
$this->alreadyInClearAllReferencesDeep = false;
|
||||
|
|
|
@ -248,6 +248,9 @@ abstract class BaseCcFilesPeer
|
|||
/** the column name for the description field */
|
||||
const DESCRIPTION = 'cc_files.description';
|
||||
|
||||
/** the column name for the artwork field */
|
||||
const ARTWORK = 'cc_files.artwork';
|
||||
|
||||
/** The default string format for model objects of the related table **/
|
||||
const DEFAULT_STRING_FORMAT = 'YAML';
|
||||
|
||||
|
@ -267,12 +270,12 @@ abstract class BaseCcFilesPeer
|
|||
* e.g. CcFilesPeer::$fieldNames[CcFilesPeer::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbMime', 'DbFtype', 'DbDirectory', 'DbFilepath', 'DbImportStatus', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbMd5', 'DbTrackTitle', 'DbArtistName', 'DbBitRate', 'DbSampleRate', 'DbFormat', 'DbLength', 'DbAlbumTitle', 'DbGenre', 'DbComments', 'DbYear', 'DbTrackNumber', 'DbChannels', 'DbUrl', 'DbBpm', 'DbRating', 'DbEncodedBy', 'DbDiscNumber', 'DbMood', 'DbLabel', 'DbComposer', 'DbEncoder', 'DbChecksum', 'DbLyrics', 'DbOrchestra', 'DbConductor', 'DbLyricist', 'DbOriginalLyricist', 'DbRadioStationName', 'DbInfoUrl', 'DbArtistUrl', 'DbAudioSourceUrl', 'DbRadioStationUrl', 'DbBuyThisUrl', 'DbIsrcNumber', 'DbCatalogNumber', 'DbOriginalArtist', 'DbCopyright', 'DbReportDatetime', 'DbReportLocation', 'DbReportOrganization', 'DbSubject', 'DbContributor', 'DbLanguage', 'DbFileExists', 'DbSoundcloudId', 'DbSoundcloudErrorCode', 'DbSoundcloudErrorMsg', 'DbSoundcloudLinkToFile', 'DbSoundCloundUploadTime', 'DbReplayGain', 'DbOwnerId', 'DbCuein', 'DbCueout', 'DbSilanCheck', 'DbHidden', 'DbIsScheduled', 'DbIsPlaylist', 'DbFilesize', 'DbDescription', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbMime', 'dbFtype', 'dbDirectory', 'dbFilepath', 'dbImportStatus', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbMd5', 'dbTrackTitle', 'dbArtistName', 'dbBitRate', 'dbSampleRate', 'dbFormat', 'dbLength', 'dbAlbumTitle', 'dbGenre', 'dbComments', 'dbYear', 'dbTrackNumber', 'dbChannels', 'dbUrl', 'dbBpm', 'dbRating', 'dbEncodedBy', 'dbDiscNumber', 'dbMood', 'dbLabel', 'dbComposer', 'dbEncoder', 'dbChecksum', 'dbLyrics', 'dbOrchestra', 'dbConductor', 'dbLyricist', 'dbOriginalLyricist', 'dbRadioStationName', 'dbInfoUrl', 'dbArtistUrl', 'dbAudioSourceUrl', 'dbRadioStationUrl', 'dbBuyThisUrl', 'dbIsrcNumber', 'dbCatalogNumber', 'dbOriginalArtist', 'dbCopyright', 'dbReportDatetime', 'dbReportLocation', 'dbReportOrganization', 'dbSubject', 'dbContributor', 'dbLanguage', 'dbFileExists', 'dbSoundcloudId', 'dbSoundcloudErrorCode', 'dbSoundcloudErrorMsg', 'dbSoundcloudLinkToFile', 'dbSoundCloundUploadTime', 'dbReplayGain', 'dbOwnerId', 'dbCuein', 'dbCueout', 'dbSilanCheck', 'dbHidden', 'dbIsScheduled', 'dbIsPlaylist', 'dbFilesize', 'dbDescription', ),
|
||||
BasePeer::TYPE_COLNAME => array (CcFilesPeer::ID, CcFilesPeer::NAME, CcFilesPeer::MIME, CcFilesPeer::FTYPE, CcFilesPeer::DIRECTORY, CcFilesPeer::FILEPATH, CcFilesPeer::IMPORT_STATUS, CcFilesPeer::CURRENTLYACCESSING, CcFilesPeer::EDITEDBY, CcFilesPeer::MTIME, CcFilesPeer::UTIME, CcFilesPeer::LPTIME, CcFilesPeer::MD5, CcFilesPeer::TRACK_TITLE, CcFilesPeer::ARTIST_NAME, CcFilesPeer::BIT_RATE, CcFilesPeer::SAMPLE_RATE, CcFilesPeer::FORMAT, CcFilesPeer::LENGTH, CcFilesPeer::ALBUM_TITLE, CcFilesPeer::GENRE, CcFilesPeer::COMMENTS, CcFilesPeer::YEAR, CcFilesPeer::TRACK_NUMBER, CcFilesPeer::CHANNELS, CcFilesPeer::URL, CcFilesPeer::BPM, CcFilesPeer::RATING, CcFilesPeer::ENCODED_BY, CcFilesPeer::DISC_NUMBER, CcFilesPeer::MOOD, CcFilesPeer::LABEL, CcFilesPeer::COMPOSER, CcFilesPeer::ENCODER, CcFilesPeer::CHECKSUM, CcFilesPeer::LYRICS, CcFilesPeer::ORCHESTRA, CcFilesPeer::CONDUCTOR, CcFilesPeer::LYRICIST, CcFilesPeer::ORIGINAL_LYRICIST, CcFilesPeer::RADIO_STATION_NAME, CcFilesPeer::INFO_URL, CcFilesPeer::ARTIST_URL, CcFilesPeer::AUDIO_SOURCE_URL, CcFilesPeer::RADIO_STATION_URL, CcFilesPeer::BUY_THIS_URL, CcFilesPeer::ISRC_NUMBER, CcFilesPeer::CATALOG_NUMBER, CcFilesPeer::ORIGINAL_ARTIST, CcFilesPeer::COPYRIGHT, CcFilesPeer::REPORT_DATETIME, CcFilesPeer::REPORT_LOCATION, CcFilesPeer::REPORT_ORGANIZATION, CcFilesPeer::SUBJECT, CcFilesPeer::CONTRIBUTOR, CcFilesPeer::LANGUAGE, CcFilesPeer::FILE_EXISTS, CcFilesPeer::SOUNDCLOUD_ID, CcFilesPeer::SOUNDCLOUD_ERROR_CODE, CcFilesPeer::SOUNDCLOUD_ERROR_MSG, CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE, CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME, CcFilesPeer::REPLAY_GAIN, CcFilesPeer::OWNER_ID, CcFilesPeer::CUEIN, CcFilesPeer::CUEOUT, CcFilesPeer::SILAN_CHECK, CcFilesPeer::HIDDEN, CcFilesPeer::IS_SCHEDULED, CcFilesPeer::IS_PLAYLIST, CcFilesPeer::FILESIZE, CcFilesPeer::DESCRIPTION, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'MIME', 'FTYPE', 'DIRECTORY', 'FILEPATH', 'IMPORT_STATUS', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', 'FILE_EXISTS', 'SOUNDCLOUD_ID', 'SOUNDCLOUD_ERROR_CODE', 'SOUNDCLOUD_ERROR_MSG', 'SOUNDCLOUD_LINK_TO_FILE', 'SOUNDCLOUD_UPLOAD_TIME', 'REPLAY_GAIN', 'OWNER_ID', 'CUEIN', 'CUEOUT', 'SILAN_CHECK', 'HIDDEN', 'IS_SCHEDULED', 'IS_PLAYLIST', 'FILESIZE', 'DESCRIPTION', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'mime', 'ftype', 'directory', 'filepath', 'import_status', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', 'file_exists', 'soundcloud_id', 'soundcloud_error_code', 'soundcloud_error_msg', 'soundcloud_link_to_file', 'soundcloud_upload_time', 'replay_gain', 'owner_id', 'cuein', 'cueout', 'silan_check', 'hidden', 'is_scheduled', 'is_playlist', 'filesize', 'description', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbMime', 'DbFtype', 'DbDirectory', 'DbFilepath', 'DbImportStatus', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbMd5', 'DbTrackTitle', 'DbArtistName', 'DbBitRate', 'DbSampleRate', 'DbFormat', 'DbLength', 'DbAlbumTitle', 'DbGenre', 'DbComments', 'DbYear', 'DbTrackNumber', 'DbChannels', 'DbUrl', 'DbBpm', 'DbRating', 'DbEncodedBy', 'DbDiscNumber', 'DbMood', 'DbLabel', 'DbComposer', 'DbEncoder', 'DbChecksum', 'DbLyrics', 'DbOrchestra', 'DbConductor', 'DbLyricist', 'DbOriginalLyricist', 'DbRadioStationName', 'DbInfoUrl', 'DbArtistUrl', 'DbAudioSourceUrl', 'DbRadioStationUrl', 'DbBuyThisUrl', 'DbIsrcNumber', 'DbCatalogNumber', 'DbOriginalArtist', 'DbCopyright', 'DbReportDatetime', 'DbReportLocation', 'DbReportOrganization', 'DbSubject', 'DbContributor', 'DbLanguage', 'DbFileExists', 'DbSoundcloudId', 'DbSoundcloudErrorCode', 'DbSoundcloudErrorMsg', 'DbSoundcloudLinkToFile', 'DbSoundCloundUploadTime', 'DbReplayGain', 'DbOwnerId', 'DbCuein', 'DbCueout', 'DbSilanCheck', 'DbHidden', 'DbIsScheduled', 'DbIsPlaylist', 'DbFilesize', 'DbDescription', 'DbArtwork', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbMime', 'dbFtype', 'dbDirectory', 'dbFilepath', 'dbImportStatus', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbMd5', 'dbTrackTitle', 'dbArtistName', 'dbBitRate', 'dbSampleRate', 'dbFormat', 'dbLength', 'dbAlbumTitle', 'dbGenre', 'dbComments', 'dbYear', 'dbTrackNumber', 'dbChannels', 'dbUrl', 'dbBpm', 'dbRating', 'dbEncodedBy', 'dbDiscNumber', 'dbMood', 'dbLabel', 'dbComposer', 'dbEncoder', 'dbChecksum', 'dbLyrics', 'dbOrchestra', 'dbConductor', 'dbLyricist', 'dbOriginalLyricist', 'dbRadioStationName', 'dbInfoUrl', 'dbArtistUrl', 'dbAudioSourceUrl', 'dbRadioStationUrl', 'dbBuyThisUrl', 'dbIsrcNumber', 'dbCatalogNumber', 'dbOriginalArtist', 'dbCopyright', 'dbReportDatetime', 'dbReportLocation', 'dbReportOrganization', 'dbSubject', 'dbContributor', 'dbLanguage', 'dbFileExists', 'dbSoundcloudId', 'dbSoundcloudErrorCode', 'dbSoundcloudErrorMsg', 'dbSoundcloudLinkToFile', 'dbSoundCloundUploadTime', 'dbReplayGain', 'dbOwnerId', 'dbCuein', 'dbCueout', 'dbSilanCheck', 'dbHidden', 'dbIsScheduled', 'dbIsPlaylist', 'dbFilesize', 'dbDescription', 'dbArtwork', ),
|
||||
BasePeer::TYPE_COLNAME => array (CcFilesPeer::ID, CcFilesPeer::NAME, CcFilesPeer::MIME, CcFilesPeer::FTYPE, CcFilesPeer::DIRECTORY, CcFilesPeer::FILEPATH, CcFilesPeer::IMPORT_STATUS, CcFilesPeer::CURRENTLYACCESSING, CcFilesPeer::EDITEDBY, CcFilesPeer::MTIME, CcFilesPeer::UTIME, CcFilesPeer::LPTIME, CcFilesPeer::MD5, CcFilesPeer::TRACK_TITLE, CcFilesPeer::ARTIST_NAME, CcFilesPeer::BIT_RATE, CcFilesPeer::SAMPLE_RATE, CcFilesPeer::FORMAT, CcFilesPeer::LENGTH, CcFilesPeer::ALBUM_TITLE, CcFilesPeer::GENRE, CcFilesPeer::COMMENTS, CcFilesPeer::YEAR, CcFilesPeer::TRACK_NUMBER, CcFilesPeer::CHANNELS, CcFilesPeer::URL, CcFilesPeer::BPM, CcFilesPeer::RATING, CcFilesPeer::ENCODED_BY, CcFilesPeer::DISC_NUMBER, CcFilesPeer::MOOD, CcFilesPeer::LABEL, CcFilesPeer::COMPOSER, CcFilesPeer::ENCODER, CcFilesPeer::CHECKSUM, CcFilesPeer::LYRICS, CcFilesPeer::ORCHESTRA, CcFilesPeer::CONDUCTOR, CcFilesPeer::LYRICIST, CcFilesPeer::ORIGINAL_LYRICIST, CcFilesPeer::RADIO_STATION_NAME, CcFilesPeer::INFO_URL, CcFilesPeer::ARTIST_URL, CcFilesPeer::AUDIO_SOURCE_URL, CcFilesPeer::RADIO_STATION_URL, CcFilesPeer::BUY_THIS_URL, CcFilesPeer::ISRC_NUMBER, CcFilesPeer::CATALOG_NUMBER, CcFilesPeer::ORIGINAL_ARTIST, CcFilesPeer::COPYRIGHT, CcFilesPeer::REPORT_DATETIME, CcFilesPeer::REPORT_LOCATION, CcFilesPeer::REPORT_ORGANIZATION, CcFilesPeer::SUBJECT, CcFilesPeer::CONTRIBUTOR, CcFilesPeer::LANGUAGE, CcFilesPeer::FILE_EXISTS, CcFilesPeer::SOUNDCLOUD_ID, CcFilesPeer::SOUNDCLOUD_ERROR_CODE, CcFilesPeer::SOUNDCLOUD_ERROR_MSG, CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE, CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME, CcFilesPeer::REPLAY_GAIN, CcFilesPeer::OWNER_ID, CcFilesPeer::CUEIN, CcFilesPeer::CUEOUT, CcFilesPeer::SILAN_CHECK, CcFilesPeer::HIDDEN, CcFilesPeer::IS_SCHEDULED, CcFilesPeer::IS_PLAYLIST, CcFilesPeer::FILESIZE, CcFilesPeer::DESCRIPTION, CcFilesPeer::ARTWORK, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'MIME', 'FTYPE', 'DIRECTORY', 'FILEPATH', 'IMPORT_STATUS', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', 'FILE_EXISTS', 'SOUNDCLOUD_ID', 'SOUNDCLOUD_ERROR_CODE', 'SOUNDCLOUD_ERROR_MSG', 'SOUNDCLOUD_LINK_TO_FILE', 'SOUNDCLOUD_UPLOAD_TIME', 'REPLAY_GAIN', 'OWNER_ID', 'CUEIN', 'CUEOUT', 'SILAN_CHECK', 'HIDDEN', 'IS_SCHEDULED', 'IS_PLAYLIST', 'FILESIZE', 'DESCRIPTION', 'ARTWORK', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'mime', 'ftype', 'directory', 'filepath', 'import_status', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', 'file_exists', 'soundcloud_id', 'soundcloud_error_code', 'soundcloud_error_msg', 'soundcloud_link_to_file', 'soundcloud_upload_time', 'replay_gain', 'owner_id', 'cuein', 'cueout', 'silan_check', 'hidden', 'is_scheduled', 'is_playlist', 'filesize', 'description', 'artwork', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -282,12 +285,12 @@ abstract class BaseCcFilesPeer
|
|||
* e.g. CcFilesPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbMime' => 2, 'DbFtype' => 3, 'DbDirectory' => 4, 'DbFilepath' => 5, 'DbImportStatus' => 6, 'DbCurrentlyaccessing' => 7, 'DbEditedby' => 8, 'DbMtime' => 9, 'DbUtime' => 10, 'DbLPtime' => 11, 'DbMd5' => 12, 'DbTrackTitle' => 13, 'DbArtistName' => 14, 'DbBitRate' => 15, 'DbSampleRate' => 16, 'DbFormat' => 17, 'DbLength' => 18, 'DbAlbumTitle' => 19, 'DbGenre' => 20, 'DbComments' => 21, 'DbYear' => 22, 'DbTrackNumber' => 23, 'DbChannels' => 24, 'DbUrl' => 25, 'DbBpm' => 26, 'DbRating' => 27, 'DbEncodedBy' => 28, 'DbDiscNumber' => 29, 'DbMood' => 30, 'DbLabel' => 31, 'DbComposer' => 32, 'DbEncoder' => 33, 'DbChecksum' => 34, 'DbLyrics' => 35, 'DbOrchestra' => 36, 'DbConductor' => 37, 'DbLyricist' => 38, 'DbOriginalLyricist' => 39, 'DbRadioStationName' => 40, 'DbInfoUrl' => 41, 'DbArtistUrl' => 42, 'DbAudioSourceUrl' => 43, 'DbRadioStationUrl' => 44, 'DbBuyThisUrl' => 45, 'DbIsrcNumber' => 46, 'DbCatalogNumber' => 47, 'DbOriginalArtist' => 48, 'DbCopyright' => 49, 'DbReportDatetime' => 50, 'DbReportLocation' => 51, 'DbReportOrganization' => 52, 'DbSubject' => 53, 'DbContributor' => 54, 'DbLanguage' => 55, 'DbFileExists' => 56, 'DbSoundcloudId' => 57, 'DbSoundcloudErrorCode' => 58, 'DbSoundcloudErrorMsg' => 59, 'DbSoundcloudLinkToFile' => 60, 'DbSoundCloundUploadTime' => 61, 'DbReplayGain' => 62, 'DbOwnerId' => 63, 'DbCuein' => 64, 'DbCueout' => 65, 'DbSilanCheck' => 66, 'DbHidden' => 67, 'DbIsScheduled' => 68, 'DbIsPlaylist' => 69, 'DbFilesize' => 70, 'DbDescription' => 71, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbMime' => 2, 'dbFtype' => 3, 'dbDirectory' => 4, 'dbFilepath' => 5, 'dbImportStatus' => 6, 'dbCurrentlyaccessing' => 7, 'dbEditedby' => 8, 'dbMtime' => 9, 'dbUtime' => 10, 'dbLPtime' => 11, 'dbMd5' => 12, 'dbTrackTitle' => 13, 'dbArtistName' => 14, 'dbBitRate' => 15, 'dbSampleRate' => 16, 'dbFormat' => 17, 'dbLength' => 18, 'dbAlbumTitle' => 19, 'dbGenre' => 20, 'dbComments' => 21, 'dbYear' => 22, 'dbTrackNumber' => 23, 'dbChannels' => 24, 'dbUrl' => 25, 'dbBpm' => 26, 'dbRating' => 27, 'dbEncodedBy' => 28, 'dbDiscNumber' => 29, 'dbMood' => 30, 'dbLabel' => 31, 'dbComposer' => 32, 'dbEncoder' => 33, 'dbChecksum' => 34, 'dbLyrics' => 35, 'dbOrchestra' => 36, 'dbConductor' => 37, 'dbLyricist' => 38, 'dbOriginalLyricist' => 39, 'dbRadioStationName' => 40, 'dbInfoUrl' => 41, 'dbArtistUrl' => 42, 'dbAudioSourceUrl' => 43, 'dbRadioStationUrl' => 44, 'dbBuyThisUrl' => 45, 'dbIsrcNumber' => 46, 'dbCatalogNumber' => 47, 'dbOriginalArtist' => 48, 'dbCopyright' => 49, 'dbReportDatetime' => 50, 'dbReportLocation' => 51, 'dbReportOrganization' => 52, 'dbSubject' => 53, 'dbContributor' => 54, 'dbLanguage' => 55, 'dbFileExists' => 56, 'dbSoundcloudId' => 57, 'dbSoundcloudErrorCode' => 58, 'dbSoundcloudErrorMsg' => 59, 'dbSoundcloudLinkToFile' => 60, 'dbSoundCloundUploadTime' => 61, 'dbReplayGain' => 62, 'dbOwnerId' => 63, 'dbCuein' => 64, 'dbCueout' => 65, 'dbSilanCheck' => 66, 'dbHidden' => 67, 'dbIsScheduled' => 68, 'dbIsPlaylist' => 69, 'dbFilesize' => 70, 'dbDescription' => 71, ),
|
||||
BasePeer::TYPE_COLNAME => array (CcFilesPeer::ID => 0, CcFilesPeer::NAME => 1, CcFilesPeer::MIME => 2, CcFilesPeer::FTYPE => 3, CcFilesPeer::DIRECTORY => 4, CcFilesPeer::FILEPATH => 5, CcFilesPeer::IMPORT_STATUS => 6, CcFilesPeer::CURRENTLYACCESSING => 7, CcFilesPeer::EDITEDBY => 8, CcFilesPeer::MTIME => 9, CcFilesPeer::UTIME => 10, CcFilesPeer::LPTIME => 11, CcFilesPeer::MD5 => 12, CcFilesPeer::TRACK_TITLE => 13, CcFilesPeer::ARTIST_NAME => 14, CcFilesPeer::BIT_RATE => 15, CcFilesPeer::SAMPLE_RATE => 16, CcFilesPeer::FORMAT => 17, CcFilesPeer::LENGTH => 18, CcFilesPeer::ALBUM_TITLE => 19, CcFilesPeer::GENRE => 20, CcFilesPeer::COMMENTS => 21, CcFilesPeer::YEAR => 22, CcFilesPeer::TRACK_NUMBER => 23, CcFilesPeer::CHANNELS => 24, CcFilesPeer::URL => 25, CcFilesPeer::BPM => 26, CcFilesPeer::RATING => 27, CcFilesPeer::ENCODED_BY => 28, CcFilesPeer::DISC_NUMBER => 29, CcFilesPeer::MOOD => 30, CcFilesPeer::LABEL => 31, CcFilesPeer::COMPOSER => 32, CcFilesPeer::ENCODER => 33, CcFilesPeer::CHECKSUM => 34, CcFilesPeer::LYRICS => 35, CcFilesPeer::ORCHESTRA => 36, CcFilesPeer::CONDUCTOR => 37, CcFilesPeer::LYRICIST => 38, CcFilesPeer::ORIGINAL_LYRICIST => 39, CcFilesPeer::RADIO_STATION_NAME => 40, CcFilesPeer::INFO_URL => 41, CcFilesPeer::ARTIST_URL => 42, CcFilesPeer::AUDIO_SOURCE_URL => 43, CcFilesPeer::RADIO_STATION_URL => 44, CcFilesPeer::BUY_THIS_URL => 45, CcFilesPeer::ISRC_NUMBER => 46, CcFilesPeer::CATALOG_NUMBER => 47, CcFilesPeer::ORIGINAL_ARTIST => 48, CcFilesPeer::COPYRIGHT => 49, CcFilesPeer::REPORT_DATETIME => 50, CcFilesPeer::REPORT_LOCATION => 51, CcFilesPeer::REPORT_ORGANIZATION => 52, CcFilesPeer::SUBJECT => 53, CcFilesPeer::CONTRIBUTOR => 54, CcFilesPeer::LANGUAGE => 55, CcFilesPeer::FILE_EXISTS => 56, CcFilesPeer::SOUNDCLOUD_ID => 57, CcFilesPeer::SOUNDCLOUD_ERROR_CODE => 58, CcFilesPeer::SOUNDCLOUD_ERROR_MSG => 59, CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE => 60, CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME => 61, CcFilesPeer::REPLAY_GAIN => 62, CcFilesPeer::OWNER_ID => 63, CcFilesPeer::CUEIN => 64, CcFilesPeer::CUEOUT => 65, CcFilesPeer::SILAN_CHECK => 66, CcFilesPeer::HIDDEN => 67, CcFilesPeer::IS_SCHEDULED => 68, CcFilesPeer::IS_PLAYLIST => 69, CcFilesPeer::FILESIZE => 70, CcFilesPeer::DESCRIPTION => 71, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'MIME' => 2, 'FTYPE' => 3, 'DIRECTORY' => 4, 'FILEPATH' => 5, 'IMPORT_STATUS' => 6, 'CURRENTLYACCESSING' => 7, 'EDITEDBY' => 8, 'MTIME' => 9, 'UTIME' => 10, 'LPTIME' => 11, 'MD5' => 12, 'TRACK_TITLE' => 13, 'ARTIST_NAME' => 14, 'BIT_RATE' => 15, 'SAMPLE_RATE' => 16, 'FORMAT' => 17, 'LENGTH' => 18, 'ALBUM_TITLE' => 19, 'GENRE' => 20, 'COMMENTS' => 21, 'YEAR' => 22, 'TRACK_NUMBER' => 23, 'CHANNELS' => 24, 'URL' => 25, 'BPM' => 26, 'RATING' => 27, 'ENCODED_BY' => 28, 'DISC_NUMBER' => 29, 'MOOD' => 30, 'LABEL' => 31, 'COMPOSER' => 32, 'ENCODER' => 33, 'CHECKSUM' => 34, 'LYRICS' => 35, 'ORCHESTRA' => 36, 'CONDUCTOR' => 37, 'LYRICIST' => 38, 'ORIGINAL_LYRICIST' => 39, 'RADIO_STATION_NAME' => 40, 'INFO_URL' => 41, 'ARTIST_URL' => 42, 'AUDIO_SOURCE_URL' => 43, 'RADIO_STATION_URL' => 44, 'BUY_THIS_URL' => 45, 'ISRC_NUMBER' => 46, 'CATALOG_NUMBER' => 47, 'ORIGINAL_ARTIST' => 48, 'COPYRIGHT' => 49, 'REPORT_DATETIME' => 50, 'REPORT_LOCATION' => 51, 'REPORT_ORGANIZATION' => 52, 'SUBJECT' => 53, 'CONTRIBUTOR' => 54, 'LANGUAGE' => 55, 'FILE_EXISTS' => 56, 'SOUNDCLOUD_ID' => 57, 'SOUNDCLOUD_ERROR_CODE' => 58, 'SOUNDCLOUD_ERROR_MSG' => 59, 'SOUNDCLOUD_LINK_TO_FILE' => 60, 'SOUNDCLOUD_UPLOAD_TIME' => 61, 'REPLAY_GAIN' => 62, 'OWNER_ID' => 63, 'CUEIN' => 64, 'CUEOUT' => 65, 'SILAN_CHECK' => 66, 'HIDDEN' => 67, 'IS_SCHEDULED' => 68, 'IS_PLAYLIST' => 69, 'FILESIZE' => 70, 'DESCRIPTION' => 71, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'mime' => 2, 'ftype' => 3, 'directory' => 4, 'filepath' => 5, 'import_status' => 6, 'currentlyaccessing' => 7, 'editedby' => 8, 'mtime' => 9, 'utime' => 10, 'lptime' => 11, 'md5' => 12, 'track_title' => 13, 'artist_name' => 14, 'bit_rate' => 15, 'sample_rate' => 16, 'format' => 17, 'length' => 18, 'album_title' => 19, 'genre' => 20, 'comments' => 21, 'year' => 22, 'track_number' => 23, 'channels' => 24, 'url' => 25, 'bpm' => 26, 'rating' => 27, 'encoded_by' => 28, 'disc_number' => 29, 'mood' => 30, 'label' => 31, 'composer' => 32, 'encoder' => 33, 'checksum' => 34, 'lyrics' => 35, 'orchestra' => 36, 'conductor' => 37, 'lyricist' => 38, 'original_lyricist' => 39, 'radio_station_name' => 40, 'info_url' => 41, 'artist_url' => 42, 'audio_source_url' => 43, 'radio_station_url' => 44, 'buy_this_url' => 45, 'isrc_number' => 46, 'catalog_number' => 47, 'original_artist' => 48, 'copyright' => 49, 'report_datetime' => 50, 'report_location' => 51, 'report_organization' => 52, 'subject' => 53, 'contributor' => 54, 'language' => 55, 'file_exists' => 56, 'soundcloud_id' => 57, 'soundcloud_error_code' => 58, 'soundcloud_error_msg' => 59, 'soundcloud_link_to_file' => 60, 'soundcloud_upload_time' => 61, 'replay_gain' => 62, 'owner_id' => 63, 'cuein' => 64, 'cueout' => 65, 'silan_check' => 66, 'hidden' => 67, 'is_scheduled' => 68, 'is_playlist' => 69, 'filesize' => 70, 'description' => 71, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbMime' => 2, 'DbFtype' => 3, 'DbDirectory' => 4, 'DbFilepath' => 5, 'DbImportStatus' => 6, 'DbCurrentlyaccessing' => 7, 'DbEditedby' => 8, 'DbMtime' => 9, 'DbUtime' => 10, 'DbLPtime' => 11, 'DbMd5' => 12, 'DbTrackTitle' => 13, 'DbArtistName' => 14, 'DbBitRate' => 15, 'DbSampleRate' => 16, 'DbFormat' => 17, 'DbLength' => 18, 'DbAlbumTitle' => 19, 'DbGenre' => 20, 'DbComments' => 21, 'DbYear' => 22, 'DbTrackNumber' => 23, 'DbChannels' => 24, 'DbUrl' => 25, 'DbBpm' => 26, 'DbRating' => 27, 'DbEncodedBy' => 28, 'DbDiscNumber' => 29, 'DbMood' => 30, 'DbLabel' => 31, 'DbComposer' => 32, 'DbEncoder' => 33, 'DbChecksum' => 34, 'DbLyrics' => 35, 'DbOrchestra' => 36, 'DbConductor' => 37, 'DbLyricist' => 38, 'DbOriginalLyricist' => 39, 'DbRadioStationName' => 40, 'DbInfoUrl' => 41, 'DbArtistUrl' => 42, 'DbAudioSourceUrl' => 43, 'DbRadioStationUrl' => 44, 'DbBuyThisUrl' => 45, 'DbIsrcNumber' => 46, 'DbCatalogNumber' => 47, 'DbOriginalArtist' => 48, 'DbCopyright' => 49, 'DbReportDatetime' => 50, 'DbReportLocation' => 51, 'DbReportOrganization' => 52, 'DbSubject' => 53, 'DbContributor' => 54, 'DbLanguage' => 55, 'DbFileExists' => 56, 'DbSoundcloudId' => 57, 'DbSoundcloudErrorCode' => 58, 'DbSoundcloudErrorMsg' => 59, 'DbSoundcloudLinkToFile' => 60, 'DbSoundCloundUploadTime' => 61, 'DbReplayGain' => 62, 'DbOwnerId' => 63, 'DbCuein' => 64, 'DbCueout' => 65, 'DbSilanCheck' => 66, 'DbHidden' => 67, 'DbIsScheduled' => 68, 'DbIsPlaylist' => 69, 'DbFilesize' => 70, 'DbDescription' => 71, 'DbArtwork' => 72, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbMime' => 2, 'dbFtype' => 3, 'dbDirectory' => 4, 'dbFilepath' => 5, 'dbImportStatus' => 6, 'dbCurrentlyaccessing' => 7, 'dbEditedby' => 8, 'dbMtime' => 9, 'dbUtime' => 10, 'dbLPtime' => 11, 'dbMd5' => 12, 'dbTrackTitle' => 13, 'dbArtistName' => 14, 'dbBitRate' => 15, 'dbSampleRate' => 16, 'dbFormat' => 17, 'dbLength' => 18, 'dbAlbumTitle' => 19, 'dbGenre' => 20, 'dbComments' => 21, 'dbYear' => 22, 'dbTrackNumber' => 23, 'dbChannels' => 24, 'dbUrl' => 25, 'dbBpm' => 26, 'dbRating' => 27, 'dbEncodedBy' => 28, 'dbDiscNumber' => 29, 'dbMood' => 30, 'dbLabel' => 31, 'dbComposer' => 32, 'dbEncoder' => 33, 'dbChecksum' => 34, 'dbLyrics' => 35, 'dbOrchestra' => 36, 'dbConductor' => 37, 'dbLyricist' => 38, 'dbOriginalLyricist' => 39, 'dbRadioStationName' => 40, 'dbInfoUrl' => 41, 'dbArtistUrl' => 42, 'dbAudioSourceUrl' => 43, 'dbRadioStationUrl' => 44, 'dbBuyThisUrl' => 45, 'dbIsrcNumber' => 46, 'dbCatalogNumber' => 47, 'dbOriginalArtist' => 48, 'dbCopyright' => 49, 'dbReportDatetime' => 50, 'dbReportLocation' => 51, 'dbReportOrganization' => 52, 'dbSubject' => 53, 'dbContributor' => 54, 'dbLanguage' => 55, 'dbFileExists' => 56, 'dbSoundcloudId' => 57, 'dbSoundcloudErrorCode' => 58, 'dbSoundcloudErrorMsg' => 59, 'dbSoundcloudLinkToFile' => 60, 'dbSoundCloundUploadTime' => 61, 'dbReplayGain' => 62, 'dbOwnerId' => 63, 'dbCuein' => 64, 'dbCueout' => 65, 'dbSilanCheck' => 66, 'dbHidden' => 67, 'dbIsScheduled' => 68, 'dbIsPlaylist' => 69, 'dbFilesize' => 70, 'dbDescription' => 71, 'dbArtwork' => 72, ),
|
||||
BasePeer::TYPE_COLNAME => array (CcFilesPeer::ID => 0, CcFilesPeer::NAME => 1, CcFilesPeer::MIME => 2, CcFilesPeer::FTYPE => 3, CcFilesPeer::DIRECTORY => 4, CcFilesPeer::FILEPATH => 5, CcFilesPeer::IMPORT_STATUS => 6, CcFilesPeer::CURRENTLYACCESSING => 7, CcFilesPeer::EDITEDBY => 8, CcFilesPeer::MTIME => 9, CcFilesPeer::UTIME => 10, CcFilesPeer::LPTIME => 11, CcFilesPeer::MD5 => 12, CcFilesPeer::TRACK_TITLE => 13, CcFilesPeer::ARTIST_NAME => 14, CcFilesPeer::BIT_RATE => 15, CcFilesPeer::SAMPLE_RATE => 16, CcFilesPeer::FORMAT => 17, CcFilesPeer::LENGTH => 18, CcFilesPeer::ALBUM_TITLE => 19, CcFilesPeer::GENRE => 20, CcFilesPeer::COMMENTS => 21, CcFilesPeer::YEAR => 22, CcFilesPeer::TRACK_NUMBER => 23, CcFilesPeer::CHANNELS => 24, CcFilesPeer::URL => 25, CcFilesPeer::BPM => 26, CcFilesPeer::RATING => 27, CcFilesPeer::ENCODED_BY => 28, CcFilesPeer::DISC_NUMBER => 29, CcFilesPeer::MOOD => 30, CcFilesPeer::LABEL => 31, CcFilesPeer::COMPOSER => 32, CcFilesPeer::ENCODER => 33, CcFilesPeer::CHECKSUM => 34, CcFilesPeer::LYRICS => 35, CcFilesPeer::ORCHESTRA => 36, CcFilesPeer::CONDUCTOR => 37, CcFilesPeer::LYRICIST => 38, CcFilesPeer::ORIGINAL_LYRICIST => 39, CcFilesPeer::RADIO_STATION_NAME => 40, CcFilesPeer::INFO_URL => 41, CcFilesPeer::ARTIST_URL => 42, CcFilesPeer::AUDIO_SOURCE_URL => 43, CcFilesPeer::RADIO_STATION_URL => 44, CcFilesPeer::BUY_THIS_URL => 45, CcFilesPeer::ISRC_NUMBER => 46, CcFilesPeer::CATALOG_NUMBER => 47, CcFilesPeer::ORIGINAL_ARTIST => 48, CcFilesPeer::COPYRIGHT => 49, CcFilesPeer::REPORT_DATETIME => 50, CcFilesPeer::REPORT_LOCATION => 51, CcFilesPeer::REPORT_ORGANIZATION => 52, CcFilesPeer::SUBJECT => 53, CcFilesPeer::CONTRIBUTOR => 54, CcFilesPeer::LANGUAGE => 55, CcFilesPeer::FILE_EXISTS => 56, CcFilesPeer::SOUNDCLOUD_ID => 57, CcFilesPeer::SOUNDCLOUD_ERROR_CODE => 58, CcFilesPeer::SOUNDCLOUD_ERROR_MSG => 59, CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE => 60, CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME => 61, CcFilesPeer::REPLAY_GAIN => 62, CcFilesPeer::OWNER_ID => 63, CcFilesPeer::CUEIN => 64, CcFilesPeer::CUEOUT => 65, CcFilesPeer::SILAN_CHECK => 66, CcFilesPeer::HIDDEN => 67, CcFilesPeer::IS_SCHEDULED => 68, CcFilesPeer::IS_PLAYLIST => 69, CcFilesPeer::FILESIZE => 70, CcFilesPeer::DESCRIPTION => 71, CcFilesPeer::DESCRIPTION => 72, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'MIME' => 2, 'FTYPE' => 3, 'DIRECTORY' => 4, 'FILEPATH' => 5, 'IMPORT_STATUS' => 6, 'CURRENTLYACCESSING' => 7, 'EDITEDBY' => 8, 'MTIME' => 9, 'UTIME' => 10, 'LPTIME' => 11, 'MD5' => 12, 'TRACK_TITLE' => 13, 'ARTIST_NAME' => 14, 'BIT_RATE' => 15, 'SAMPLE_RATE' => 16, 'FORMAT' => 17, 'LENGTH' => 18, 'ALBUM_TITLE' => 19, 'GENRE' => 20, 'COMMENTS' => 21, 'YEAR' => 22, 'TRACK_NUMBER' => 23, 'CHANNELS' => 24, 'URL' => 25, 'BPM' => 26, 'RATING' => 27, 'ENCODED_BY' => 28, 'DISC_NUMBER' => 29, 'MOOD' => 30, 'LABEL' => 31, 'COMPOSER' => 32, 'ENCODER' => 33, 'CHECKSUM' => 34, 'LYRICS' => 35, 'ORCHESTRA' => 36, 'CONDUCTOR' => 37, 'LYRICIST' => 38, 'ORIGINAL_LYRICIST' => 39, 'RADIO_STATION_NAME' => 40, 'INFO_URL' => 41, 'ARTIST_URL' => 42, 'AUDIO_SOURCE_URL' => 43, 'RADIO_STATION_URL' => 44, 'BUY_THIS_URL' => 45, 'ISRC_NUMBER' => 46, 'CATALOG_NUMBER' => 47, 'ORIGINAL_ARTIST' => 48, 'COPYRIGHT' => 49, 'REPORT_DATETIME' => 50, 'REPORT_LOCATION' => 51, 'REPORT_ORGANIZATION' => 52, 'SUBJECT' => 53, 'CONTRIBUTOR' => 54, 'LANGUAGE' => 55, 'FILE_EXISTS' => 56, 'SOUNDCLOUD_ID' => 57, 'SOUNDCLOUD_ERROR_CODE' => 58, 'SOUNDCLOUD_ERROR_MSG' => 59, 'SOUNDCLOUD_LINK_TO_FILE' => 60, 'SOUNDCLOUD_UPLOAD_TIME' => 61, 'REPLAY_GAIN' => 62, 'OWNER_ID' => 63, 'CUEIN' => 64, 'CUEOUT' => 65, 'SILAN_CHECK' => 66, 'HIDDEN' => 67, 'IS_SCHEDULED' => 68, 'IS_PLAYLIST' => 69, 'FILESIZE' => 70, 'DESCRIPTION' => 71, 'ARTWORK' => 72, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'mime' => 2, 'ftype' => 3, 'directory' => 4, 'filepath' => 5, 'import_status' => 6, 'currentlyaccessing' => 7, 'editedby' => 8, 'mtime' => 9, 'utime' => 10, 'lptime' => 11, 'md5' => 12, 'track_title' => 13, 'artist_name' => 14, 'bit_rate' => 15, 'sample_rate' => 16, 'format' => 17, 'length' => 18, 'album_title' => 19, 'genre' => 20, 'comments' => 21, 'year' => 22, 'track_number' => 23, 'channels' => 24, 'url' => 25, 'bpm' => 26, 'rating' => 27, 'encoded_by' => 28, 'disc_number' => 29, 'mood' => 30, 'label' => 31, 'composer' => 32, 'encoder' => 33, 'checksum' => 34, 'lyrics' => 35, 'orchestra' => 36, 'conductor' => 37, 'lyricist' => 38, 'original_lyricist' => 39, 'radio_station_name' => 40, 'info_url' => 41, 'artist_url' => 42, 'audio_source_url' => 43, 'radio_station_url' => 44, 'buy_this_url' => 45, 'isrc_number' => 46, 'catalog_number' => 47, 'original_artist' => 48, 'copyright' => 49, 'report_datetime' => 50, 'report_location' => 51, 'report_organization' => 52, 'subject' => 53, 'contributor' => 54, 'language' => 55, 'file_exists' => 56, 'soundcloud_id' => 57, 'soundcloud_error_code' => 58, 'soundcloud_error_msg' => 59, 'soundcloud_link_to_file' => 60, 'soundcloud_upload_time' => 61, 'replay_gain' => 62, 'owner_id' => 63, 'cuein' => 64, 'cueout' => 65, 'silan_check' => 66, 'hidden' => 67, 'is_scheduled' => 68, 'is_playlist' => 69, 'filesize' => 70, 'description' => 71, 'artwork' => 72, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -433,6 +436,7 @@ abstract class BaseCcFilesPeer
|
|||
$criteria->addSelectColumn(CcFilesPeer::IS_PLAYLIST);
|
||||
$criteria->addSelectColumn(CcFilesPeer::FILESIZE);
|
||||
$criteria->addSelectColumn(CcFilesPeer::DESCRIPTION);
|
||||
$criteria->addSelectColumn(CcFilesPeer::ARTWORK);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.id');
|
||||
$criteria->addSelectColumn($alias . '.name');
|
||||
|
@ -506,6 +510,7 @@ abstract class BaseCcFilesPeer
|
|||
$criteria->addSelectColumn($alias . '.is_playlist');
|
||||
$criteria->addSelectColumn($alias . '.filesize');
|
||||
$criteria->addSelectColumn($alias . '.description');
|
||||
$criteria->addSelectColumn($alias . '.artwork');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
* @method CcFilesQuery orderByDbIsPlaylist($order = Criteria::ASC) Order by the is_playlist column
|
||||
* @method CcFilesQuery orderByDbFilesize($order = Criteria::ASC) Order by the filesize column
|
||||
* @method CcFilesQuery orderByDbDescription($order = Criteria::ASC) Order by the description column
|
||||
* @method CcFilesQuery orderByDbArtwork($order = Criteria::ASC) Order by the artwork column
|
||||
*
|
||||
* @method CcFilesQuery groupByDbId() Group by the id column
|
||||
* @method CcFilesQuery groupByDbName() Group by the name column
|
||||
|
@ -151,6 +152,7 @@
|
|||
* @method CcFilesQuery groupByDbIsPlaylist() Group by the is_playlist column
|
||||
* @method CcFilesQuery groupByDbFilesize() Group by the filesize column
|
||||
* @method CcFilesQuery groupByDbDescription() Group by the description column
|
||||
* @method CcFilesQuery groupByDbArtwork() Group by the artwork column
|
||||
*
|
||||
* @method CcFilesQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method CcFilesQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
|
@ -274,6 +276,7 @@
|
|||
* @method CcFiles findOneByDbIsPlaylist(boolean $is_playlist) Return the first CcFiles filtered by the is_playlist column
|
||||
* @method CcFiles findOneByDbFilesize(int $filesize) Return the first CcFiles filtered by the filesize column
|
||||
* @method CcFiles findOneByDbDescription(string $description) Return the first CcFiles filtered by the description column
|
||||
* @method CcFiles findOneByDbArtwork(string $artwork) Return the first CcFiles filtered by the artwork column
|
||||
*
|
||||
* @method array findByDbId(int $id) Return CcFiles objects filtered by the id column
|
||||
* @method array findByDbName(string $name) Return CcFiles objects filtered by the name column
|
||||
|
@ -347,6 +350,7 @@
|
|||
* @method array findByDbIsPlaylist(boolean $is_playlist) Return CcFiles objects filtered by the is_playlist column
|
||||
* @method array findByDbFilesize(int $filesize) Return CcFiles objects filtered by the filesize column
|
||||
* @method array findByDbDescription(string $description) Return CcFiles objects filtered by the description column
|
||||
* @method array findByDbArtwork(string $artwork) Return CcFiles objects filtered by the artwork column
|
||||
*
|
||||
* @package propel.generator.airtime.om
|
||||
*/
|
||||
|
@ -454,7 +458,7 @@ abstract class BaseCcFilesQuery extends ModelCriteria
|
|||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT "id", "name", "mime", "ftype", "directory", "filepath", "import_status", "currentlyaccessing", "editedby", "mtime", "utime", "lptime", "md5", "track_title", "artist_name", "bit_rate", "sample_rate", "format", "length", "album_title", "genre", "comments", "year", "track_number", "channels", "url", "bpm", "rating", "encoded_by", "disc_number", "mood", "label", "composer", "encoder", "checksum", "lyrics", "orchestra", "conductor", "lyricist", "original_lyricist", "radio_station_name", "info_url", "artist_url", "audio_source_url", "radio_station_url", "buy_this_url", "isrc_number", "catalog_number", "original_artist", "copyright", "report_datetime", "report_location", "report_organization", "subject", "contributor", "language", "file_exists", "soundcloud_id", "soundcloud_error_code", "soundcloud_error_msg", "soundcloud_link_to_file", "soundcloud_upload_time", "replay_gain", "owner_id", "cuein", "cueout", "silan_check", "hidden", "is_scheduled", "is_playlist", "filesize", "description" FROM "cc_files" WHERE "id" = :p0';
|
||||
$sql = 'SELECT "id", "name", "mime", "ftype", "directory", "filepath", "import_status", "currentlyaccessing", "editedby", "mtime", "utime", "lptime", "md5", "track_title", "artist_name", "bit_rate", "sample_rate", "format", "length", "album_title", "genre", "comments", "year", "track_number", "channels", "url", "bpm", "rating", "encoded_by", "disc_number", "mood", "label", "composer", "encoder", "checksum", "lyrics", "orchestra", "conductor", "lyricist", "original_lyricist", "radio_station_name", "info_url", "artist_url", "audio_source_url", "radio_station_url", "buy_this_url", "isrc_number", "catalog_number", "original_artist", "copyright", "report_datetime", "report_location", "report_organization", "subject", "contributor", "language", "file_exists", "soundcloud_id", "soundcloud_error_code", "soundcloud_error_msg", "soundcloud_link_to_file", "soundcloud_upload_time", "replay_gain", "owner_id", "cuein", "cueout", "silan_check", "hidden", "is_scheduled", "is_playlist", "filesize", "description", "artwork" FROM "cc_files" WHERE "id" = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
|
@ -1937,6 +1941,35 @@ abstract class BaseCcFilesQuery extends ModelCriteria
|
|||
return $this->addUsingAlias(CcFilesPeer::INFO_URL, $dbInfoUrl, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the artwork column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbArtwork('fooValue'); // WHERE artwork = 'fooValue'
|
||||
* $query->filterByDbArtwork('%fooValue%'); // WHERE artwork LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbArtwork The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcFilesQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbArtwork($dbArtwork = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbArtwork)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbArtwork)) {
|
||||
$dbArtwork = str_replace('*', '%', $dbArtwork);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CcFilesPeer::ARTWORK, $dbArtwork, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the artist_url column
|
||||
*
|
||||
|
|
|
@ -494,6 +494,19 @@ class AirtimeUpgrader2516 extends AirtimeUpgrader
|
|||
}
|
||||
}
|
||||
|
||||
class AirtimeUpgrader2517 extends AirtimeUpgrader
|
||||
{
|
||||
protected function getSupportedSchemaVersions() {
|
||||
return array(
|
||||
'2.5.16'
|
||||
);
|
||||
}
|
||||
|
||||
public function getNewVersion() {
|
||||
return '2.5.17';
|
||||
}
|
||||
}
|
||||
|
||||
class AirtimeUpgrader300alpha extends AirtimeUpgrader
|
||||
{
|
||||
protected function getSupportedSchemaVersions() {
|
||||
|
|
|
@ -1,12 +1,27 @@
|
|||
<?php $get_artwork = FileDataHelper::getArtworkData($this->artwork, 256); ?>
|
||||
<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong edit-md-dialog">
|
||||
<div class="inner_editor_title">
|
||||
<div class="track-edit-header" style="top:15px">
|
||||
<?php if ($this->permissionDenied) { ?> <h3><?php echo _("You do not have permission to edit this track.") ?></h3> <?php } ?>
|
||||
<H2><?php
|
||||
<?php
|
||||
/*
|
||||
if ($this->permissionDenied) {
|
||||
echo(_("Viewing "));
|
||||
} else {
|
||||
echo(_("Editing "));
|
||||
}?>"<span class="title_obj_name"><?php echo($this->title); ?></span>"</H2>
|
||||
} */
|
||||
?>
|
||||
<div class="track-edit-right-wrapper">
|
||||
<div class="track-edit-right">
|
||||
<div class="inner_track_editor_title" style="width: 100%;">
|
||||
<h2 style="line-height: 26px !important;"><span class="title_obj_name"><?php echo($this->title); ?></span></h2>
|
||||
<h3 style="line-height: 2px !important;"><span class=""><?php echo($this->artist_name); ?></span></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="track-edit-left">
|
||||
<?php echo '<img width="140" height="140" src="' . $get_artwork .'">'; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 160px;"></div>
|
||||
<?php echo $this->form; ?>
|
||||
</div>
|
|
@ -23,6 +23,8 @@ foreach ($this->md as $key => &$value) {
|
|||
<tr><td><?php echo _("Copyright:"); ?></td><td><?php echo ($this->md["MDATA_KEY_COPYRIGHT"]);?></td></tr>
|
||||
<tr><td><?php echo _("Isrc Number:"); ?></td><td><?php echo ($this->md["MDATA_KEY_ISRC"]);?></td></tr>
|
||||
<tr><td><?php echo _("Website:"); ?></td><td><?php echo ($this->md["MDATA_KEY_URL"]);?></td></tr>
|
||||
<tr><td><?php echo _("Artwork:"); ?></td><td><?php echo ($this->md["MDATA_KEY_ARTWORK"]);?></td></tr>
|
||||
<tr><td><?php echo _("Artwork Data:"); ?></td><td><?php echo ($this->md["MDATA_KEY_ARTWORK_DATA"]);?></td></tr>
|
||||
<tr><td><?php echo _("Language:"); ?></td><td><?php echo ($this->md["MDATA_KEY_LANGUAGE"]);?></td></tr>
|
||||
<tr><td class='file-md-qtip-nowrap'><?php echo _("File Path:"); ?></td><td><?php echo ($this->md["MDATA_KEY_FILEPATH"]);?></td></tr>
|
||||
</table>
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<div class="logo-container">
|
||||
<img class="logo" src="data:image/png;base64,<?php echo Application_Model_Preference::GetStationLogo(); ?>" />
|
||||
</div>
|
||||
<div class="now-playing-artwork" id="now-playing-artwork">
|
||||
<div class="now-playing-artwork_containter" id="now-playing-artwork_containter"></div>
|
||||
</div>
|
||||
<div class="now-playing-block">
|
||||
<div class="text-row"><strong><?php echo _("Previous:"); ?></strong> <span id='previous'></span> <span id='prev-length'></span></div>
|
||||
<div class="now-playing-info song">
|
||||
|
|
|
@ -84,6 +84,7 @@
|
|||
<column name="is_playlist" phpName="DbIsPlaylist" type="BOOLEAN" defaultValue="false"/>
|
||||
<column name="filesize" phpName="DbFilesize" type="Integer" required="true" defaultValue="0"/>
|
||||
<column name="description" phpName="DbDescription" type="VARCHAR" size="512" />
|
||||
<column name="artwork" phpName="DbArtwork" type="VARCHAR" size="512" required="false"/>
|
||||
<foreign-key foreignTable="cc_subjs" phpName="FkOwner" name="cc_files_owner_fkey">
|
||||
<reference local="owner_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
|
|
|
@ -96,6 +96,7 @@ CREATE TABLE "cc_files"
|
|||
"is_playlist" BOOLEAN DEFAULT 'f',
|
||||
"filesize" INTEGER DEFAULT 0 NOT NULL,
|
||||
"description" VARCHAR(512),
|
||||
"artwork" VARCHAR(512),
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
|
|
|
@ -574,6 +574,18 @@ li.ui-state-default {
|
|||
line-height: inherit;
|
||||
}
|
||||
|
||||
.inner_track_editor_title h2 {
|
||||
margin: 10px 0 0 0;
|
||||
width: 80%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.inner_track_editor_title span {
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.clearfix:after, .side_playlist li:after {
|
||||
display: none !important;
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 69 KiB |
|
@ -268,7 +268,7 @@ img.logo
|
|||
overflow:hidden;
|
||||
}
|
||||
|
||||
.now-playing-block, .show-block, .on-air-block, .time-info-block, .listen-control-block {
|
||||
.now-playing-block, .now-playing-artwork, .show-block, .on-air-block, .time-info-block, .listen-control-block {
|
||||
height:100px;
|
||||
float:left;
|
||||
margin-right:10px;
|
||||
|
@ -280,15 +280,45 @@ img.logo
|
|||
min-width:170px;
|
||||
}
|
||||
|
||||
.now-playing-artwork {
|
||||
background: url(images/masterpanel_spacer.png) no-repeat 0 0;
|
||||
margin-left: 152px;
|
||||
padding: 12px 3px 13px 14px;
|
||||
|
||||
}
|
||||
div.now-playing-artwork
|
||||
{
|
||||
width: 75px;
|
||||
height: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
div.now-playing-artwork_containter{
|
||||
background: #3a3a3a url(images/playinfo_bg.png) repeat-x 0 0;
|
||||
height: 75px;
|
||||
weight: 75px;
|
||||
border: 1px solid #242424;
|
||||
border-bottom-color:#727272;
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
line-height:22px;
|
||||
overflow:hidden;
|
||||
}
|
||||
img.artwork
|
||||
{
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
padding: 3em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.now-playing-block {
|
||||
-webkit-flex: 1 0;
|
||||
-moz-flex: 1 0;
|
||||
-ms-flex: 1 0;
|
||||
-o-flex: 1 0;
|
||||
flex: 1 0;
|
||||
background: url(images/masterpanel_spacer.png) no-repeat 0 0;
|
||||
margin-left: 152px;
|
||||
padding-left: 14px;
|
||||
margin-left: 0;
|
||||
}
|
||||
.show-block {
|
||||
-webkit-flex: 1 0;
|
||||
|
@ -384,7 +414,7 @@ ol.navigation {
|
|||
}
|
||||
}
|
||||
@media screen and (max-width: 875px) {
|
||||
.now-playing-block {
|
||||
.now-playing-block, .now-playing-artwork {
|
||||
display: none;
|
||||
}
|
||||
.source-info-block {
|
||||
|
@ -1050,6 +1080,10 @@ button.ColVis_Button.ColVis_ShowAll {
|
|||
text-align: right;
|
||||
}
|
||||
|
||||
.library_artwork {
|
||||
line-height: 1 !important;
|
||||
}
|
||||
|
||||
/*----END Data Table----*/
|
||||
|
||||
fieldset {
|
||||
|
@ -4232,3 +4266,21 @@ li .ui-state-hover {
|
|||
text-decoration: none;
|
||||
color: #f0f0f0;
|
||||
}
|
||||
|
||||
/* Library - Tracks Edit */
|
||||
.track-edit-header{
|
||||
padding: 5px 0 20px 5px;
|
||||
}
|
||||
.track-edit-left {
|
||||
float: left;
|
||||
width: 100px;
|
||||
margin-left: -100%;
|
||||
}
|
||||
.track-edit-right-wrapper {
|
||||
/*background-color: #333333;*/
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
.track-edit-right {
|
||||
margin-left: 160px;
|
||||
}
|
||||
|
|
|
@ -126,10 +126,29 @@ function updatePlaybar(){
|
|||
}
|
||||
|
||||
if (currentSong !== null && !master_dj_on_air && !live_dj_on_air){
|
||||
if (currentSong.record == "1")
|
||||
if (currentSong.record == "1") {
|
||||
$('#current').html("<span style='color:red; font-weight:bold'>"+$.i18n._("Recording:")+"</span>"+currentSong.name+",");
|
||||
else
|
||||
} else {
|
||||
$('#current').text(currentSong.name+",");
|
||||
|
||||
if (currentSong.metadata.artwork_data) {
|
||||
|
||||
var check_current_song = Cookies.get('current_track');
|
||||
var loaded = Cookies.get('loaded');
|
||||
|
||||
if (check_current_song != currentSong.name) {
|
||||
$('#now-playing-artwork_containter').html("<img height='75' width='75' class'artwork' src='"+ currentSong.metadata.artwork_data +"' />");
|
||||
Cookies.remove('current_track');
|
||||
Cookies.set('current_track', currentSong.name);
|
||||
}
|
||||
// makes sure it stays updated with current track if page loads
|
||||
if (loaded != UNIQID) {
|
||||
Cookies.remove('current_track');
|
||||
Cookies.remove('loaded');
|
||||
Cookies.set('loaded', UNIQID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if (master_dj_on_air) {
|
||||
if (showName) {
|
||||
|
|
|
@ -53,7 +53,8 @@ var AIRTIME = (function(AIRTIME) {
|
|||
"year" : "n",
|
||||
"owner_id" : "s",
|
||||
"info_url" : "s",
|
||||
"replay_gain" : "n"
|
||||
"replay_gain" : "n",
|
||||
"artwork" : "s"
|
||||
};
|
||||
|
||||
if (AIRTIME.library === undefined) {
|
||||
|
@ -575,6 +576,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
/* ftype */ { "sTitle" : "" , "mDataProp" : "ftype" , "bSearchable" : false , "bVisible" : false },
|
||||
/* Checkbox */ { "sTitle" : "" , "mDataProp" : "checkbox" , "bSortable" : false , "bSearchable" : false , "sWidth" : "16px" , "sClass" : "library_checkbox" },
|
||||
/* Type */ { "sTitle" : "" , "mDataProp" : "image" , "bSortable" : false , "bSearchable" : false , "sWidth" : "16px" , "sClass" : "library_type" , "iDataSort" : 0 },
|
||||
/* Artwork */ { "sTitle" : "" , "mDataProp" : "artwork" , "bSortable" : false , "bSearchable" : false , "sWidth" : "28px" , "sClass" : "library_artwork" , "iDataSort" : 0 },
|
||||
/* Is Scheduled */ { "sTitle" : $.i18n._("Scheduled") , "mDataProp" : "is_scheduled" , "bVisible" : false , "bSearchable" : false , "sWidth" : "90px" , "sClass" : "library_is_scheduled" },
|
||||
///* Is Playlist */ { "sTitle" : $.i18n._("Playlist / Block") , "mDataProp" : "is_playlist" , "bSearchable" : false , "sWidth" : "110px" , "sClass" : "library_is_playlist"} ,
|
||||
/* Title */ { "sTitle" : $.i18n._("Title") , "mDataProp" : "track_title" , "sClass" : "library_title" , "sWidth" : "170px" },
|
||||
|
@ -767,6 +769,11 @@ var AIRTIME = (function(AIRTIME) {
|
|||
// add audio preview image/button
|
||||
if (aData.ftype === "audioclip") {
|
||||
$(nRow).find('td.library_type').html('<img title="' + $.i18n._("Track preview") + '" src="' + baseUrl + 'css/images/icon_audioclip.png">');
|
||||
if (aData.artwork_data) {
|
||||
$(nRow).find('td.library_artwork').html('<img class="img_small" id="'+ aData.id +'" width="28" height="28" src="'+ aData.artwork_data +'">');
|
||||
} else {
|
||||
$(nRow).find('td.library_artwork').html('<img class="img_small" width="28" height="28" src="' + baseUrl + 'css/images/no-cover.jpg">');
|
||||
}
|
||||
} else if (aData.ftype === "playlist") {
|
||||
$(nRow).find('td.library_type').html('<img title="' + $.i18n._("Playlist preview") + '" src="' + baseUrl + 'css/images/icon_playlist.png">');
|
||||
} else if (aData.ftype === "block") {
|
||||
|
@ -1589,6 +1596,7 @@ var validationTypes = {
|
|||
"track_title" : "s",
|
||||
"track_number" : "i",
|
||||
"info_url" : "s",
|
||||
"artwork" : "s",
|
||||
"year" : "i"
|
||||
};
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
$(document).ready(function() {
|
||||
var aoColumns = [
|
||||
/* Artwork */ { "sTitle" : $.i18n._("Artwork") , "mDataProp" : "artwork" , "bVisible" : false , "sClass" : "library_artwork" , "sWidth" : "150px" },
|
||||
/* Title */ { "sTitle" : $.i18n._("Title") , "mDataProp" : "track_title" , "sClass" : "library_title" , "sWidth" : "170px" },
|
||||
/* Creator */ { "sTitle" : $.i18n._("Creator") , "mDataProp" : "artist_name" , "sClass" : "library_creator" , "sWidth" : "160px" },
|
||||
/* Upload Time */ { "sTitle" : $.i18n._("Uploaded") , "mDataProp" : "utime" , "bVisible" : false , "sClass" : "library_upload_time" , "sWidth" : "155px" },
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"classmap": ["airtime_mvc/tests/application/", "vendor/phpunit/dbunit/src/"]
|
||||
},
|
||||
"require": {
|
||||
"james-heinrich/getid3": "dev-master",
|
||||
"propel/propel1": "1.7.0-stable",
|
||||
"aws/aws-sdk-php": "2.7.9",
|
||||
"raven/raven": "0.12.0",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "d60326985fa7371adf17493a929e961c",
|
||||
"content-hash": "f77b688ef532e689ba85602a6faff987",
|
||||
"packages": [
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
|
@ -279,6 +279,69 @@
|
|||
],
|
||||
"time": "2014-02-03T15:49:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "james-heinrich/getid3",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/JamesHeinrich/getID3.git",
|
||||
"reference": "0723b77cafe9278618cfb6bc91b75e73705d3de8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/JamesHeinrich/getID3/zipball/0723b77cafe9278618cfb6bc91b75e73705d3de8",
|
||||
"reference": "0723b77cafe9278618cfb6bc91b75e73705d3de8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"jakub-onderka/php-parallel-lint": "^0.9 || ^1.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-SimpleXML": "SimpleXML extension is required to analyze RIFF/WAV/BWF audio files (also requires `ext-libxml`).",
|
||||
"ext-com_dotnet": "COM extension is required when loading files larger than 2GB on Windows.",
|
||||
"ext-ctype": "ctype extension is required when loading files larger than 2GB on 32-bit PHP (also on 64-bit PHP on Windows) or executing `getid3_lib::CopyTagsToComments`.",
|
||||
"ext-dba": "DBA extension is required to use the DBA database as a cache storage.",
|
||||
"ext-exif": "EXIF extension is required for graphic modules.",
|
||||
"ext-iconv": "iconv extension is required to work with different character sets (when `ext-mbstring` is not available).",
|
||||
"ext-json": "JSON extension is required to analyze Apple Quicktime videos.",
|
||||
"ext-libxml": "libxml extension is required to analyze RIFF/WAV/BWF audio files.",
|
||||
"ext-mbstring": "mbstring extension is required to work with different character sets.",
|
||||
"ext-mysql": "MySQL extension is required to use the MySQL database as a cache storage (deprecated in PHP 5.5, removed in PHP >= 7.0, use `ext-mysqli` instead).",
|
||||
"ext-mysqli": "MySQLi extension is required to use the MySQL database as a cache storage.",
|
||||
"ext-rar": "RAR extension is required for RAR archive module.",
|
||||
"ext-sqlite3": "SQLite3 extension is required to use the SQLite3 database as a cache storage.",
|
||||
"ext-xml": "XML extension is required for graphic modules to analyze the XML metadata.",
|
||||
"ext-zlib": "Zlib extension is required for archive modules and compressed metadata."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.9.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"getid3/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"GPL-1.0-or-later",
|
||||
"LGPL-3.0-only",
|
||||
"MPL-2.0"
|
||||
],
|
||||
"description": "PHP script that extracts useful information from popular multimedia file formats",
|
||||
"homepage": "https://www.getid3.org/",
|
||||
"keywords": [
|
||||
"codecs",
|
||||
"php",
|
||||
"tags"
|
||||
],
|
||||
"time": "2019-09-16T19:08:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "massivescale/celery-php",
|
||||
"version": "dev-master",
|
||||
|
@ -3445,6 +3508,7 @@
|
|||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {
|
||||
"james-heinrich/getid3": 20,
|
||||
"massivescale/celery-php": 20,
|
||||
"simplepie/simplepie": 20,
|
||||
"zf1s/zend-rest": 20,
|
||||
|
|
Loading…
Reference in New Issue