Generate artwork images for audio using ID3.

This commit is contained in:
Codenift 2019-09-19 20:07:50 -04:00
parent 24dd71ad33
commit 45dbf84750
30 changed files with 939 additions and 199 deletions

View File

@ -22,7 +22,7 @@ Common Non-linked Code
Airtime Web
-----------
Linked code:
* Zend Framework 1.10.3
* Zend Framework 1.10.3
- What is it: Framework for PHP web apps
- Web site: http://framework.zend.com/
- License: New BSD license
@ -32,7 +32,7 @@ Linked code:
- What is it: PHP library
- Notes: We only use the PEAR base class PEAR_Error, in the "PEAR" PEAR library.
- License: New BSD License
- Compatible with GPLv3? Yes.
- Compatible with GPLv3? Yes.
* Propel ORM
- What is it: Maps DB data into PHP objects
@ -40,7 +40,7 @@ Linked code:
- License: MIT/Expat License
- Compatible with the GPL: Yes. See http://www.gnu.org/licenses/license-list.html
* Phing
* Phing
- What is it: PHP project build system
- Web site: http://phing.info/trac/
- Note: Only used for development, not needed to run Airtime.
@ -48,22 +48,27 @@ Linked code:
* PHP-AMQPLIB
- What is it: PHP library to interact with RabbitMQ
- Web site: https://github.com/tnc/php-amqplib
- Web site: https://github.com/tnc/php-amqplib
- License: LGPLv2.1
- Compatible with GPLv3? Yes
* Soundcloud PHP API wrapper
- What is it: PHP library to upload to SoundCloud
- Web site: https://github.com/mptre/php-soundcloud/blob/master/Services/Soundcloud.php
- License: MIT
- 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
* Apache Web Server 2.2
- Web site: http://httpd.apache.org/
- License: Apache 2.0. See http://httpd.apache.org/docs/2.2/license.html
* PostgreSQL 9.1
* PostgreSQL 9.1
- Web site: http://www.postgresql.org/
- License: The PostgreSQL License. See http://www.postgresql.org/about/licence
@ -71,22 +76,22 @@ Non-linked code:
- Web site: http://www.php.net/
- License: The PHP License. See http://www.php.net/license/3_01.txt
* jQuery
* jQuery
- Web site: http://jquery.com/
- License: MIT and GPL. See http://jquery.org/license
- jQuery components used:
* Full Calendar
* Full Calendar
- Web site: http://arshaw.com/fullcalendar/
- License: Dual licensed under MIT and GPLv2
* Colorpicker
* Colorpicker
- Web site: http://www.eyecon.ro/colorpicker/
- License: Dual licensed under the MIT and GPL licenses.
* Context Menu
- Web site: http://jursza.net/dev/jjmenu/
- License: MIT [http://www.opensource.org/licenses/mit-license.php]
- License: MIT [http://www.opensource.org/licenses/mit-license.php]
* PLUpload
- Web site: http://www.plupload.com
@ -98,8 +103,8 @@ Non-linked code:
* qtip
- Web site: http://craigsworks.com/projects/qtip/
- License: MIT
- License: MIT
* TimePicker
- Web site: http://fgelinas.com/code/timepicker/
- License: Dual licensed under the MIT or GPL Version 2 licenses.
@ -120,7 +125,7 @@ Non-linked code:
Media-Monitor
-------------
Linked code:
* Mutagen
* Mutagen
- What is it: Parser of audio file metadata
- Web site: http://code.google.com/p/mutagen/
- License: GPLv2-only
@ -129,7 +134,7 @@ Linked code:
- What is it: Python interface to RabbitMQ
- Web site: http://pypi.python.org/pypi/kombu/
- License: New BSD
- Compatible with GPLv3? Yes.
- Compatible with GPLv3? Yes.
* pyinotify
- Python interface to inotify
@ -155,7 +160,7 @@ Linked code:
- What is it: Python interface to RabbitMQ
- Web site: http://pypi.python.org/pypi/kombu/
- License: New BSD
- Compatible with GPLv3? Yes.
- Compatible with GPLv3? Yes.
Non-linked code:
* Python 2.7
@ -174,7 +179,7 @@ Linked code:
* Kombu
- Web site: http://pypi.python.org/pypi/kombu/
- License: New BSD
- Compatible with GPLv3? Yes.
- Compatible with GPLv3? Yes.
Non-linked code:
* Python 2.7

View File

@ -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");
}
}
}

View File

@ -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');

View File

@ -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
*/

View File

@ -392,7 +392,14 @@ class LibraryController extends Zend_Controller_Action
$serialized = array();
//need to convert from serialized jQuery array.
foreach ($js as $j) {
$serialized[$j["name"]] = $j["value"];
//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.
@ -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');
}

View File

@ -122,7 +122,7 @@ class ScheduleController extends Zend_Controller_Action
$currentUser = $service_user->getCurrentUser();
$userTimezone = new DateTimeZone(Application_Model_Preference::GetUserTimezone());
$start = new DateTime($this->_getParam('start', null), $userTimezone);
$start->setTimezone(new DateTimeZone("UTC"));
$end = new DateTime($this->_getParam('end', null), $userTimezone);
@ -187,7 +187,7 @@ class ScheduleController extends Zend_Controller_Action
$this->view->show_error = true;
return false;
}
$error = $service_calendar->moveShow($deltaDay, $deltaMin);
if (isset($error)) {
$this->view->error = $error;
@ -209,7 +209,7 @@ class ScheduleController extends Zend_Controller_Action
$log_vars["params"]["delta day"] = $deltaDay;
$log_vars["params"]["delta minute"] = $deltaMin;
Logging::info($log_vars);
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
$user = new Application_Model_User($userInfo->id);
@ -239,7 +239,7 @@ class ScheduleController extends Zend_Controller_Action
$log_vars["params"] = array();
$log_vars["params"]["instance id"] = $instanceId;
Logging::info($log_vars);
$service_show = new Application_Service_ShowService();
$showId = $service_show->deleteShow($instanceId, true);
@ -261,7 +261,7 @@ class ScheduleController extends Zend_Controller_Action
public function clearShowAction()
{
$instanceId = $this->_getParam('id');
$log_vars = array();
$log_vars["url"] = $_SERVER['HTTP_HOST'];
$log_vars["action"] = "schedule/clear-show";
@ -296,12 +296,14 @@ class ScheduleController extends Zend_Controller_Action
/* Convert all UTC times to localtime before sending back to user. */
$range["schedulerTime"] = Application_Common_DateHelper::UTCStringToUserTimezoneString($range["schedulerTime"]);
if (isset($range["previous"])) {
$range["previous"]["starts"] = Application_Common_DateHelper::UTCStringToUserTimezoneString($range["previous"]["starts"]);
$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"]);
}
@ -309,14 +311,14 @@ class ScheduleController extends Zend_Controller_Action
$range["next"]["starts"] = Application_Common_DateHelper::UTCStringToUserTimezoneString($range["next"]["starts"]);
$range["next"]["ends"] = Application_Common_DateHelper::UTCStringToUserTimezoneString($range["next"]["ends"]);
}
Application_Common_DateHelper::convertTimestamps(
$range["currentShow"],
$range["currentShow"],
array("starts", "ends", "start_timestamp", "end_timestamp"),
"user"
);
Application_Common_DateHelper::convertTimestamps(
$range["nextShow"],
$range["nextShow"],
array("starts", "ends", "start_timestamp", "end_timestamp"),
"user"
);
@ -324,7 +326,7 @@ class ScheduleController extends Zend_Controller_Action
//TODO: Add timezone and timezoneOffset back into the ApiController's results.
$range["timezone"] = Application_Common_DateHelper::getUserTimezoneAbbreviation();
$range["timezoneOffset"] = Application_Common_DateHelper::getUserTimezoneOffset();
$source_status = array();
$switch_status = array();
$live_dj = Application_Model_Preference::GetSourceStatus("live_dj");
@ -358,7 +360,7 @@ class ScheduleController extends Zend_Controller_Action
return false;
}
$originalShowId = $show->isRebroadcast();
if (!is_null($originalShowId)) {
try {
@ -375,7 +377,7 @@ class ScheduleController extends Zend_Controller_Action
$displayTimeZone = new DateTimeZone(Application_Model_Preference::GetTimezone());
$originalDateTime = new DateTime($originalShowStart, new DateTimeZone("UTC"));
$originalDateTime->setTimezone($displayTimeZone);
$this->view->additionalShowInfo =
sprintf(_("Rebroadcast of show %s from %s at %s"),
$originalShowName,
@ -461,7 +463,7 @@ class ScheduleController extends Zend_Controller_Action
$log_vars["params"] = array();
$log_vars["params"]["form_data"] = $data;
Logging::info($log_vars);
$service_showForm = new Application_Service_ShowFormService(
$data["add_show_id"], $data["add_show_instance_id"]);
$service_show = new Application_Service_ShowService(null, $data);
@ -513,7 +515,7 @@ class ScheduleController extends Zend_Controller_Action
if ($data['add_show_day_check'] == "") {
$data['add_show_day_check'] = null;
}
$log_vars = array();
$log_vars["url"] = $_SERVER['HTTP_HOST'];
$log_vars["action"] = "schedule/edit-show";
@ -525,12 +527,12 @@ class ScheduleController extends Zend_Controller_Action
list($data, $validateStartDate, $validateStartTime, $originalShowStartDateTime) =
$service_showForm->preEditShowValidationCheck($data);
if ($service_showForm->validateShowForms($forms, $data, $validateStartDate,
$originalShowStartDateTime, true, $data["add_show_instance_id"])) {
// Get the show ID from the show service to pass as a parameter to the RESTful ShowImageController
$this->view->showId = $service_show->addUpdateShow($data);
$this->view->addNewShow = true;
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
} else {
@ -541,7 +543,7 @@ class ScheduleController extends Zend_Controller_Action
$this->view->when->getElement('add_show_start_time')->setOptions(array('disabled' => true));
}
//$this->view->rr->getElement('add_show_record')->setOptions(array('disabled' => true));
$this->view->addNewShow = false;
$this->view->action = "edit-show";
$this->view->form = $this->view->render('schedule/add-show-form.phtml');
@ -551,7 +553,7 @@ class ScheduleController extends Zend_Controller_Action
public function addShowAction()
{
$service_showForm = new Application_Service_ShowFormService(null);
$js = $this->_getParam('data');
$data = array();
@ -565,20 +567,20 @@ class ScheduleController extends Zend_Controller_Action
// TODO: move this to js
$data['add_show_hosts'] = $this->_getParam('hosts');
$data['add_show_day_check'] = $this->_getParam('days');
if ($data['add_show_day_check'] == "") {
$data['add_show_day_check'] = null;
}
$log_vars = array();
$log_vars["url"] = $_SERVER['HTTP_HOST'];
$log_vars["action"] = "schedule/add-show";
$log_vars["params"] = array();
$log_vars["params"]["form_data"] = $data;
Logging::info($log_vars);
$forms = $this->createShowFormAction();
$this->view->addNewShow = true;
if ($data['add_show_start_now'] == "now") {
@ -597,18 +599,18 @@ class ScheduleController extends Zend_Controller_Action
if ($service_showForm->validateShowForms($forms, $data)) {
// Get the show ID from the show service to pass as a parameter to the RESTful ShowImageController
$this->view->showId = $service_show->addUpdateShow($data);
//send new show forms to the user
$this->createShowFormAction(true);
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
Logging::debug("Show creation succeeded");
} else {
$this->view->form = $this->view->render('schedule/add-show-form.phtml');
Logging::debug("Show creation failed");
}
}
public function createShowFormAction($populateDefaults=false)
{
$service_showForm = new Application_Service_ShowFormService();
@ -638,7 +640,7 @@ class ScheduleController extends Zend_Controller_Action
public function deleteShowAction()
{
$instanceId = $this->_getParam('id');
$log_vars = array();
$log_vars["url"] = $_SERVER['HTTP_HOST'];
$log_vars["action"] = "schedule/delete-show";
@ -648,7 +650,7 @@ class ScheduleController extends Zend_Controller_Action
$service_show = new Application_Service_ShowService();
$showId = $service_show->deleteShow($instanceId);
if (!$showId) {
$this->view->show_error = true;
}
@ -663,7 +665,7 @@ class ScheduleController extends Zend_Controller_Action
$log_vars["params"] = array();
$log_vars["params"]["instance id"] = $this->_getParam('id');
Logging::info($log_vars);
$user = Application_Model_User::getCurrentUser();
if ($user->isUserType(array(UTYPE_SUPERADMIN, UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) {
@ -730,7 +732,7 @@ class ScheduleController extends Zend_Controller_Action
$start = $this->_getParam('startTime');
$end = $this->_getParam('endTime');
$timezone = $this->_getParam('timezone');
$service_showForm = new Application_Service_ShowFormService();
$result = $service_showForm->calculateDuration($start, $end, $timezone);
@ -741,10 +743,10 @@ class ScheduleController extends Zend_Controller_Action
public function updateFutureIsScheduledAction()
{
$schedId = $this->_getParam('schedId');
$scheduleService = new Application_Service_SchedulerService();
$redrawLibTable = $scheduleService->updateFutureIsScheduled($schedId, false);
$this->_helper->json->sendJson(array("redrawLibTable" => $redrawLibTable));
}
@ -762,5 +764,5 @@ class ScheduleController extends Zend_Controller_Action
$this->_helper->json->sendJson($localTime);
}
}

View File

@ -91,7 +91,7 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
$userType = "";
}
$view->headScript()->appendScript("var userType = '$userType';");
// Dropzone also accept file extensions and doesn't correctly extract certain mimetypes (eg. FLAC - try it),
// so we append the file extensions to the list of mimetypes and that makes it work.
$mimeTypes = FileDataHelper::getAudioMimeTypeArray();
@ -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()

View File

@ -0,0 +1 @@
ALTER TABLE cc_files ADD COLUMN artwork TYPE character varying(255);

View File

@ -2,9 +2,9 @@
class Application_Form_EditAudioMD extends Zend_Form
{
public function init() {}
public function startForm($p_id)
{
$baseUrl = Application_Common_OsPath::getBaseDir();
@ -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';

View File

@ -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 {

View File

@ -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) {
@ -209,7 +210,7 @@ class Application_Model_StoredFile
if ($dbColumn == "track_title" && (is_null($mdValue) || $mdValue == "")) {
continue;
}
// Bpm gets POSTed as a string type. With Propel 1.6 this value
// was casted to an integer type before saving it to the db. But
// Propel 1.7 does not do this
@ -352,8 +353,8 @@ SQL;
return array();
}
}
/**
/**
* Check if the file (on disk) corresponding to this class exists or not.
* @return boolean true if the file exists, false otherwise.
*/
@ -415,11 +416,11 @@ SQL;
//Update the user's disk usage
Application_Model_Preference::updateDiskUsage(-1 * $filesize);
//Explicitly update any playlist's and block's length that contain
//the file getting deleted
self::updateBlockAndPlaylistLength($this->_file->getDbId());
//delete the file record from cc_files (and cloud_file, if applicable)
$this->_file->delete();
}
@ -427,7 +428,7 @@ SQL;
/*
* This function is meant to be called when a file is getting
* deleted from the library. It re-calculates the length of
* all blocks and playlists that contained the deleted file.
* all blocks and playlists that contained the deleted file.
*/
private static function updateBlockAndPlaylistLength($fileId)
{
@ -471,7 +472,7 @@ SQL;
public function getFilePaths()
{
assert($this->_file);
return $this->_file->getURLsForTrackPreviewOrDownload();
}
@ -528,7 +529,7 @@ SQL;
{
return $baseUrl."api/get-media/file/".$this->getId();
}
public function getResourceId()
{
return $this->_file->getResourceId();
@ -545,7 +546,7 @@ SQL;
}
return $filesize;
}
public static function Insert($md, $con)
{
// save some work by checking if filepath is given right away
@ -592,17 +593,17 @@ SQL;
if (isset($p_id)) {
$p_id = intval($p_id);
$storedFile = CcFilesQuery::create()->findPK($p_id, $con);
if (is_null($storedFile)) {
throw new Exception("Could not recall file with id: ".$p_id);
}
//Attempt to get the cloud file object and return it. If no cloud
//file object is found then we are dealing with a regular stored
//object so return that
$cloudFile = CloudFileQuery::create()->findOneByCcFileId($p_id);
if (is_null($cloudFile)) {
return self::createWithFile($storedFile, $con);
} else {
@ -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)
@ -693,49 +694,49 @@ SQL;
$blSelect[] = "BL.id AS ".$key;
$fileSelect[] = "FILES.id AS $key";
$streamSelect[] = "ws.id AS ".$key;
}
}
elseif ($key === "track_title") {
$plSelect[] = "name AS ".$key;
$blSelect[] = "name AS ".$key;
$fileSelect[] = $key;
$streamSelect[] = "name AS ".$key;
}
}
elseif ($key === "ftype") {
$plSelect[] = "'playlist'::varchar AS ".$key;
$blSelect[] = "'block'::varchar AS ".$key;
$fileSelect[] = $key;
$streamSelect[] = "'stream'::varchar AS ".$key;
}
}
elseif ($key === "artist_name") {
$plSelect[] = "login AS ".$key;
$blSelect[] = "login AS ".$key;
$fileSelect[] = $key;
$streamSelect[] = "login AS ".$key;
}
}
elseif ($key === "owner_id") {
$plSelect[] = "login AS ".$key;
$blSelect[] = "login AS ".$key;
$fileSelect[] = "sub.login AS $key";
$streamSelect[] = "login AS ".$key;
}
}
elseif ($key === "replay_gain") {
$plSelect[] = "NULL::NUMERIC AS ".$key;
$blSelect[] = "NULL::NUMERIC AS ".$key;
$fileSelect[] = $key;
$streamSelect[] = "NULL::NUMERIC AS ".$key;
}
}
elseif ($key === "lptime") {
$plSelect[] = "NULL::TIMESTAMP AS ".$key;
$blSelect[] = "NULL::TIMESTAMP AS ".$key;
$fileSelect[] = $key;
$streamSelect[] = $key;
}
}
elseif ($key === "is_scheduled" || $key === "is_playlist") {
$plSelect[] = "NULL::boolean AS ".$key;
$blSelect[] = "NULL::boolean AS ".$key;
$fileSelect[] = $key;
$streamSelect[] = "NULL::boolean AS ".$key;
}
}
elseif ($key === "cuein" || $key === "cueout") {
$plSelect[] = "NULL::INTERVAL AS ".$key;
$blSelect[] = "NULL::INTERVAL AS ".$key;
@ -755,7 +756,7 @@ SQL;
$blSelect[] = $key;
$fileSelect[] = $key;
$streamSelect[] = $key;
}
}
elseif ($key === "year") {
$plSelect[] = "EXTRACT(YEAR FROM utime)::varchar AS ".$key;
$blSelect[] = "EXTRACT(YEAR FROM utime)::varchar AS ".$key;
@ -768,13 +769,13 @@ SQL;
$blSelect[] = "NULL::int AS ".$key;
$fileSelect[] = $key;
$streamSelect[] = "NULL::int AS ".$key;
}
}
elseif ($key === "filepath") {
$plSelect[] = "NULL::VARCHAR AS ".$key;
$blSelect[] = "NULL::VARCHAR AS ".$key;
$fileSelect[] = $key;
$streamSelect[] = "url AS ".$key;
}
}
else if ($key == "mime") {
$plSelect[] = "NULL::VARCHAR AS ".$key;
$blSelect[] = "NULL::VARCHAR AS ".$key;
@ -828,7 +829,10 @@ 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);
@ -874,7 +881,7 @@ SQL;
$len_formatter = new LengthFormatter($row_length);
$row['length'] = $len_formatter->format();
//convert mtime and utime to localtime
$row['mtime'] = new DateTime($row['mtime'], $utcTimezone);
$row['mtime']->setTimeZone($displayTimezone);
@ -882,7 +889,7 @@ SQL;
$row['utime'] = new DateTime($row['utime'], $utcTimezone);
$row['utime']->setTimeZone($displayTimezone);
$row['utime'] = $row['utime']->format(DEFAULT_TIMESTAMP_FORMAT);
//need to convert last played to localtime if it exists.
if (isset($row['lptime'])) {
$row['lptime'] = new DateTime($row['lptime'], $utcTimezone);
@ -904,16 +911,16 @@ SQL;
}
/**
* Copy a newly uploaded audio file from its temporary upload directory
* on the local disk (like /tmp) over to Airtime's "stor" directory,
* Copy a newly uploaded audio file from its temporary upload directory
* on the local disk (like /tmp) over to Airtime's "stor" directory,
* which is where all ingested music/media live.
*
*
* This is done in PHP here on the web server rather than in airtime_analyzer because
* the airtime_analyzer might be running on a different physical computer than the web server,
* and it probably won't have access to the web server's /tmp folder. The stor/organize directory
* is, however, both accessible to the machines running airtime_analyzer and the web server
* is, however, both accessible to the machines running airtime_analyzer and the web server
* on Airtime Pro.
*
*
* The file is actually copied to "stor/organize", which is a staging directory where files go
* before they're processed by airtime_analyzer, which then moves them to "stor/imported" in the final
* step.
@ -936,11 +943,11 @@ SQL;
throw new Exception("Failed to create organize directory.");
}
}
if (chmod($audio_file, 0644) === false) {
Logging::info("Warning: couldn't change permissions of $audio_file to 0644");
}
// Did all the checks for real, now trying to copy
$audio_stor = Application_Common_OsPath::join($stor, "organize",
$originalFilename);
@ -976,7 +983,7 @@ SQL;
}
return $audio_stor;
}
/*
* Pass the file through Liquidsoap and test if it is readable. Return True if readable, and False otherwise.
*/
@ -1157,7 +1164,7 @@ SQL;
}
/**
*
*
* Updates the is_scheduled flag to false for tracks that are no longer
* scheduled in the future. We do this by checking the difference between
* all files scheduled in the future and all files with is_scheduled = true.
@ -1171,15 +1178,15 @@ SQL;
$futureScheduledFilesSelectCriteria->add(CcSchedulePeer::ENDS, gmdate(DEFAULT_TIMESTAMP_FORMAT), Criteria::GREATER_THAN);
$stmt = CcSchedulePeer::doSelectStmt($futureScheduledFilesSelectCriteria);
$filesScheduledInFuture = $stmt->fetchAll(PDO::FETCH_COLUMN, 0);
$filesCurrentlySetWithIsScheduledSelectCriteria = new Criteria();
$filesCurrentlySetWithIsScheduledSelectCriteria->addSelectColumn(CcFilesPeer::ID);
$filesCurrentlySetWithIsScheduledSelectCriteria->add(CcFilesPeer::IS_SCHEDULED, true);
$stmt = CcFilesPeer::doSelectStmt($filesCurrentlySetWithIsScheduledSelectCriteria);
$filesCurrentlySetWithIsScheduled = $stmt->fetchAll(PDO::FETCH_COLUMN, 0);
$diff = array_diff($filesCurrentlySetWithIsScheduled, $filesScheduledInFuture);
$con = Propel::getConnection(CcFilesPeer::DATABASE_NAME);
$selectCriteria = new Criteria();
$selectCriteria->add(CcFilesPeer::ID, $diff, Criteria::IN);

View File

@ -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();
@ -319,13 +325,13 @@ class CcFiles extends BaseCcFiles {
{
$cuein = $this->getDbCuein();
$cueout = $this->getDbCueout();
$cueinSec = Application_Common_DateHelper::calculateLengthInSeconds($cuein);
$cueoutSec = Application_Common_DateHelper::calculateLengthInSeconds($cueout);
$lengthSec = bcsub($cueoutSec, $cueinSec, 6);
$length = Application_Common_DateHelper::secondsToPlaylistTime($lengthSec);
return $length;
}
@ -342,7 +348,7 @@ class CcFiles extends BaseCcFiles {
return $this->getDbFileExists() && !$this->getDbHidden();
}
public function reassignTo($user)
public function reassignTo($user)
{
$this->setDbOwnerId( $user->getDbId() );
$this->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
@ -495,23 +516,29 @@ class CcFiles extends BaseCcFiles {
{
return is_file($this->getAbsoluteFilePath());
}
/**
*
*
* Deletes the file from the stor directory on disk.
*/
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);
}
}
/**
*
*
* This function refers to the file's Amazon S3 resource id.
* Returns null because cc_files are stored on local disk.
*/
@ -519,10 +546,10 @@ class CcFiles extends BaseCcFiles {
{
return null;
}
public function getCcFileId()
{
return $this->id;
}
} // CcFiles

View File

@ -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()

View File

@ -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;

View File

@ -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');
}
}

View File

@ -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
*

View File

@ -284,7 +284,7 @@ class AirtimeUpgrader254 extends AirtimeUpgrader
{
return '2.5.4';
}
protected function _runUpgrade()
{
//First, ensure there are no superadmins already.
@ -350,7 +350,7 @@ class AirtimeUpgrader259 extends AirtimeUpgrader {
'2.5.5'
);
}
public function getNewVersion() {
return '2.5.9';
}
@ -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() {
@ -569,7 +582,7 @@ class AirtimeUpgrader300alpha7_1 extends AirtimeUpgrader
return '3.0.0-alpha.7.1';
}
}
}
/**
* Class AirtimeUpgrader300alpha7-2
*

View File

@ -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
if ($this->permissionDenied) {
echo(_("Viewing "));
} else {
echo(_("Editing "));
}?>"<span class="title_obj_name"><?php echo($this->title); ?></span>"</H2>
<?php
/*
if ($this->permissionDenied) {
echo(_("Viewing "));
} else {
echo(_("Editing "));
} */
?>
<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>
</div>

View File

@ -1,4 +1,4 @@
<?php
<?php
//XSS exploit prevention
foreach ($this->md as $key => &$value) {
$value = $this->escape($value);
@ -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>
@ -99,7 +101,7 @@ foreach ($this->md as $key => &$value) {
<?php } ?>
<?php endforeach; ?>
</table>
<?php } elseif ($this->blType == "Dynamic") { ?>
<div class='file-md-qtip-left'><span><?php echo _("Dynamic Smart Block Criteria: "); ?></span></div>
<table class='library-get-file-md table-small'>

View File

@ -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">
@ -55,7 +58,7 @@
<div class="time" id="time"></div>
<div class="personal-block">
<a id="current-user" href=<?php echo $this->baseUrl . "/user/edit-user"?>><span class="name"><?php echo $this->escape($this->loggedInAs()); ?></span></a>
<span>|</span>
<span>|</span>
<a href=<?php echo $this->baseUrl . "/login/logout"?>><?php echo _("Logout")?></a>
</div>
</div>

View File

@ -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>
@ -152,7 +153,7 @@
<!-- A show is_linkable if it has never been linked before. Once a show becomes unlinked
it can not be linked again -->
<column name="image_path" phpName="DbImagePath" type="VARCHAR" size="255" required="false" defaultValue=""/>
<!-- Fully qualified path for the image associated with this show.
<!-- Fully qualified path for the image associated with this show.
Default is /path/to/stor/dir/:ownerId/show-images/:showId/imageName -->
<column name="has_autoplaylist" phpName="DbHasAutoPlaylist" type="BOOLEAN" required="true" defaultValue="false"/>
<column name="autoplaylist_id" phpName="DbAutoPlaylistId" type="INTEGER" required="false"/>
@ -249,7 +250,7 @@
<column name="file_id" phpName="DbFileId" type="INTEGER" required="false"/>
<column name="block_id" phpName="DbBlockId" type="INTEGER" required="false"/>
<column name="stream_id" phpName="DbStreamId" type="INTEGER" required="false"/>
<!-- What type of item is stored in the playlist.
<!-- What type of item is stored in the playlist.
0: audiotrack
1: webstream
2: block
@ -319,7 +320,7 @@
<column name="block_id" phpName="DbBlockId" type="INTEGER" required="true"/>
<foreign-key foreignTable="cc_block" name="cc_blockcontents_block_id_fkey" onDelete="CASCADE">
<reference local="block_id" foreign="id"/>
</foreign-key>
</foreign-key>
</table>
<table name="cc_pref" phpName="CcPref">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
@ -355,7 +356,7 @@
<column name="instance_id" phpName="DbInstanceId" type="INTEGER" required="true"/>
<column name="playout_status" phpName="DbPlayoutStatus" type="SMALLINT" required="true" defaultValue="1"/>
<column name="broadcasted" phpName="DbBroadcasted" type="SMALLINT" required="true" defaultValue="0"/>
<!-- Broadcasted is set to 1 when show and master source are not on.
<!-- Broadcasted is set to 1 when show and master source are not on.
We need to know this for logging playout history. (It only gets logged when
broadcasted = 1)
-->

View File

@ -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")
);

View File

@ -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

View File

@ -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;
@ -331,7 +361,7 @@ img.logo
color:#fff;
font-size:15px;
line-height:22px;
text-indent:5px;
text-indent:5px;
overflow:hidden;
margin-bottom:3px;
}
@ -361,12 +391,12 @@ img.logo
}
.now-playing-info .show-length {
color:#c4c4c4;
padding-left:6px;
padding-left:6px;
}
.now-playing-info .song-length {
color:#9b9b9b;
padding-right:6px;
padding-right:6px;
}
.on-air-block {
@ -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 {
@ -415,7 +445,7 @@ ol.navigation {
margin-top:34px;
display:block;
text-align:center;
}
.listen-control-button {
margin-top:6px;
@ -573,7 +603,7 @@ table.library-track-md{
width: 280px;
}
.ui-tooltip-dark.file-md-long{
.ui-tooltip-dark.file-md-long{
max-width: 415px !important;
overflow-y: unset;
}
@ -653,7 +683,7 @@ table.library-get-file-md.table-small{
.webstream {
color: #4eba70;
}
/***** LIBRARY QTIP METADATA SPECIFIC STYLES END *****/
@ -786,11 +816,11 @@ label {
dl.inline-list {
float: left;
margin: 0;
padding: 0;
padding: 0;
}
dl.inline-list dt {
dl.inline-list dt {
clear: left;
float: left;
margin: 0;
@ -802,7 +832,7 @@ dl.inline-list dt {
text-align:left;
min-width:70px;
}
dl.inline-list dd {
dl.inline-list dd {
float: left;
margin: 0;
padding: 0px 0 4px 15px;
@ -862,7 +892,7 @@ dl.inline-list dd {
.even {
background-color: #2f2f2f;
}
.datatable tr .selected td {
background-color: #abcfe2;
}
@ -920,13 +950,13 @@ dl.inline-list dd {
.dataTables_type {
float:right;
margin:0 8px 0 0;
}
.dataTables_length {
float:left;
margin:0;
}
.dataTables_length label {
padding:0;
@ -1008,7 +1038,7 @@ div.blockOverlay {
.dataTables_empty {
cursor: auto;
}
table.dataTable tbody tr,
table.dataTable tbody tr,
table.dataTable span.DataTables_sort_icon {
cursor: pointer;
@ -1050,6 +1080,10 @@ button.ColVis_Button.ColVis_ShowAll {
text-align: right;
}
.library_artwork {
line-height: 1 !important;
}
/*----END Data Table----*/
fieldset {
@ -1391,7 +1425,7 @@ ful
/** Extremely nasty workaround for a fullcalendar bug, where clicking "Add Show"
would cause this large space under the table header. The CSS to get to that
is ridiculously complicated and set in the HTML (!) dynamically with JS,
which makes it a pain in the ass to fix. That's why we're overriding it
which makes it a pain in the ass to fix. That's why we're overriding it
with !important here.
*/
@ -1558,11 +1592,11 @@ h2#scheduled_playlist_name {
font-weight:normal;
margin:0;
padding:8px 0 0px 12px;
color:#1c1c1c;
color:#1c1c1c;
}
h2#scheduled_playlist_name span {
color:#656565;
color:#656565;
}
.time {
@ -1589,7 +1623,7 @@ h2#scheduled_playlist_name span {
#schedule_calendar .ui-progressbar {
width: 46%;
height: 5px;
margin: 9px 9px 0 0;
margin: 9px 9px 0 0;
}
#schedule_calendar .ui-progressbar.ui-widget-content {
@ -1687,7 +1721,7 @@ h2#scheduled_playlist_name span {
width: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
box-sizing: border-box;
padding: 4px 0 8px;
}
@ -1752,7 +1786,7 @@ h2#scheduled_playlist_name span {
.ui-state-default .ui-icon.crossfade-main-icon {
background:url(images/crossfade_main.png) no-repeat 0 2px;
width:25px;
width:25px;
}
.btn.crossfade-main-button span {
@ -1771,7 +1805,7 @@ h2#scheduled_playlist_name span {
line-height: 14px;
vertical-align: text-top;
margin-top: 1px;
margin-right: -5px;
margin-right: -5px;
}
.ui-button-icon-only.crossfade-main-button .ui-icon {
@ -1988,7 +2022,7 @@ div.errors, span.errors{
span.errors.sp-errors{
width: 429px;
display: block;
display: block;
}
.collapsible-header, .collapsible-header-disabled {
@ -2015,7 +2049,7 @@ span.errors.sp-errors{
position:absolute;
left:5px;
top:12px;
}
.collapsible-header.closed .arrow-icon, .collapsible-header-disabled.close .arrow-icon {
background-position: 0 -11px !important;
@ -2409,7 +2443,7 @@ dd.radio-inline-list, .preferences dd.radio-inline-list, .stream-config dd.radio
.preferences dd.block-display .input_select, .stream-config dd.block-display .input_select {
width: 100%;
}
.preferences dd.block-display .input_text_area, .preferences dd.block-display .input_text
.preferences dd.block-display .input_text_area, .preferences dd.block-display .input_text
.stream-config dd.block-display .input_text_area, .stream-config dd.block-display .input_text,
.stream-config dd.block-display input[type="text"], .stream-config dd.block-display input[type="password"] {
width: 98.5%;
@ -2650,7 +2684,7 @@ label span {
#watched-folder-section dd.block-display {
clear:both;
min-height:25px;
}
#watched-folder-section dd.block-display.selected-item {
clear:both;
@ -2832,7 +2866,7 @@ dt.block-display.info-block {
width: 99.5%;
height: 110px;
}
.input-info {
font-size:12px;
padding:0 0 0 5px;
@ -2970,8 +3004,8 @@ tfoot tr th {
font-weight:bold;
text-align:left;
}
/*---//////////////////// STATUS TABLE ////////////////////---*/
.statustable {
background-color: #D8D8D8;
@ -3147,7 +3181,7 @@ dd .stream-status {
.qtip div > span {
padding: 5px;
}
.pull-left {
float:left;
}
@ -3182,12 +3216,12 @@ dd .stream-status {
}
/*---//////////////////// NEW BUTTONS ////////////////////
/*---//////////////////// NEW BUTTONS ////////////////////
.btn {
display: inline-block;
*display: inline;
*zoom: 1;
padding: 4px 10px 4px;
margin-bottom: 0;
@ -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;
}

View File

@ -41,7 +41,7 @@ var nextSongPrepare = true;
var nextShowPrepare = true;
function secondsTimer(){
/* This function constantly calls itself every 'uiUpdateInterval'
/* This function constantly calls itself every 'uiUpdateInterval'
* micro-seconds and is responsible for updating the UI. */
if (localRemoteTimeOffset !== null){
var date = new Date();
@ -59,7 +59,7 @@ function newSongStart(){
if (nextSong.type == 'track') {
currentSong = nextSong;
nextSong = null;
}
}
}
function nextShowStart(){
@ -83,13 +83,13 @@ function updateProgressBarValue(){
var songPercentDone = 0;
var scheduled_play_div = $("#scheduled_play_div");
var scheduled_play_line_to_switch = scheduled_play_div.parent().find(".line-to-switch");
if (currentSong !== null){
var songElapsedTime = 0;
songPercentDone = (approximateServerTime - currentSong.songStartPosixTime)/currentSong.songLengthMs*100;
songElapsedTime = approximateServerTime - currentSong.songStartPosixTime;
if (songPercentDone < 0) {
songPercentDone = 0;
songPercentDone = 0;
//currentSong = null;
} else if (songPercentDone > 100) {
songPercentDone = 100;
@ -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) {
@ -211,12 +230,12 @@ function calculateTimeToNextSong() {
if (approximateServerTime === null) {
return;
}
if (newSongTimeoutId !== null) {
/* We have a previous timeout set, let's unset it */
clearTimeout(newSongTimeoutId);
newSongTimeoutId = null;
}
}
var diff = nextSong.songStartPosixTime - approximateServerTime;
if (diff < 0) diff=0;
@ -233,7 +252,7 @@ function calculateTimeToNextShow() {
/* We have a previous timeout set, let's unset it */
clearTimeout(newShowTimeoutId);
newShowTimeoutId = null;
}
}
var diff = nextShow[0].showStartPosixTime - approximateServerTime;
if (diff < 0) diff=0;
@ -256,7 +275,7 @@ function parseItems(obj){
calcAdditionalData(nextSong);
calculateTimeToNextSong();
}
currentShow = new Array();
if (obj.currentShow.length > 0) {
calcAdditionalShowData(obj.currentShow);
@ -269,7 +288,7 @@ function parseItems(obj){
nextShow = obj.nextShow;
calculateTimeToNextShow();
}
var schedulePosixTime = convertDateToPosixTime(obj.schedulerTime);
var date = new Date();
@ -281,7 +300,7 @@ function parseSourceStatus(obj){
var master_div = $("#master_dj_div");
var live_li = live_div.parent();
var master_li = master_div.parent();
if(obj.live_dj_source == false){
live_li.find(".line-to-switch").attr("class", "line-to-switch off");
live_div.removeClass("ready");
@ -289,7 +308,7 @@ function parseSourceStatus(obj){
live_li.find(".line-to-switch").attr("class", "line-to-switch on");
live_div.addClass("ready");
}
if(obj.master_dj_source == false){
master_li.find(".line-to-switch").attr("class", "line-to-switch off");
master_div.removeClass("ready");
@ -300,43 +319,43 @@ function parseSourceStatus(obj){
}
function parseSwitchStatus(obj){
if(obj.live_dj_source == "on"){
live_dj_on_air = true;
}else{
live_dj_on_air = false;
}
if(obj.master_dj_source == "on"){
master_dj_on_air = true;
}else{
master_dj_on_air = false;
}
if(obj.scheduled_play == "on"){
scheduled_play_on_air = true;
}else{
scheduled_play_on_air = false;
}
var scheduled_play_switch = $("#scheduled_play.source-switch-button");
var live_dj_switch = $("#live_dj.source-switch-button");
var master_dj_switch = $("#master_dj.source-switch-button");
scheduled_play_switch.find("span").html(obj.scheduled_play);
if(scheduled_play_on_air){
scheduled_play_switch.addClass("active");
}else{
scheduled_play_switch.removeClass("active");
}
live_dj_switch.find("span").html(obj.live_dj_source);
if(live_dj_on_air){
live_dj_switch.addClass("active");
}else{
live_dj_switch.removeClass("active");
}
master_dj_switch.find("span").html(obj.master_dj_source)
if(master_dj_on_air){
master_dj_switch.addClass("active");
@ -351,7 +370,7 @@ function controlOnAirLight(){
onAirOffIterations = 0;
} else if (onAirOffIterations < 20) {
//if less than 4 seconds have gone by (< 20 executions of this function)
//then keep the ON-AIR light on. Only after at least 3 seconds have gone by,
//then keep the ON-AIR light on. Only after at least 3 seconds have gone by,
//should we be allowed to turn it off. This is to stop the light from temporarily turning
//off between tracks: CC-3725
onAirOffIterations++;
@ -364,7 +383,7 @@ function controlSwitchLight(){
var live_li= $("#live_dj_div").parent();
var master_li = $("#master_dj_div").parent();
var scheduled_play_li = $("#scheduled_play_div").parent();
if((scheduled_play_on_air && scheduled_play_source) && !live_dj_on_air && !master_dj_on_air){
scheduled_play_li.find(".line-to-on-air").attr("class", "line-to-on-air on");
live_li.find(".line-to-on-air").attr("class", "line-to-on-air off");
@ -385,8 +404,8 @@ function controlSwitchLight(){
}
function getScheduleFromServer(){
$.ajax({ url: baseUrl+"Schedule/get-current-playlist/format/json",
dataType:"json",
$.ajax({ url: baseUrl+"Schedule/get-current-playlist/format/json",
dataType:"json",
success:function(data){
parseItems(data.entries);
parseSourceStatus(data.source_status);
@ -440,7 +459,7 @@ function setSwitchListener(ele){
function kickSource(ele){
var sourcename = $(ele).attr('id');
$.get(baseUrl+"Dashboard/disconnect-source/format/json/sourcename/"+sourcename, function(data){
if(data.error){
alert(data.error);
@ -458,7 +477,7 @@ function init() {
secondsTimer();
setupQtip();
$('.listen-control-button').click(function() {
if (stream_window == null || stream_window.closed)
stream_window=window.open(baseUrl+"Dashboard/stream-player", 'name', 'width=400,height=158');
@ -490,13 +509,13 @@ $(document).ready(function() {
if ($('.errors').length === 0) {
setCurrentUserPseudoPassword();
}
$('body').on('click','#current-user', function() {
$.ajax({
url: baseUrl+'user/edit-user/format/json'
});
});
$('body').on('click', '#cu_save_user', function() {
$.cookie("airtime_locale", $('#cu_locale').val(), {path: '/'});
});

View File

@ -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"
};

View File

@ -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" },

View File

@ -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",

66
composer.lock generated
View File

@ -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,