Merge branch 'master' into gh-actions

This commit is contained in:
Kyle Robbertze 2021-05-21 15:18:39 +02:00
commit 482fef46a1
201 changed files with 133815 additions and 173837 deletions

View File

@ -52,12 +52,6 @@ Linked code:
- 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
- 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

View File

@ -331,39 +331,6 @@ class StationPodcastTask implements AirtimeTask {
}
/**
* TODO: this and the above StationPodcastTask should probably be unified since the
* behaviour is essentially identical
*
* Class BandwidthLimitTask
*
* Checks the bandwidth limit rollover timer and resets the allotted
* limit if enough time has passed (default: 1 month)
*/
class BandwidthLimitTask implements AirtimeTask {
const BANDWIDTH_LIMIT_RESET_TIMER_SECONDS = 2.628e+6;
/**
* Check whether the task should be run
*
* @return bool true if the task needs to be run, otherwise false
*/
public function shouldBeRun() {
$lastReset = Application_Model_Preference::getBandwidthLimitResetTimer();
return empty($lastReset) || (microtime(true) > ($lastReset + self::BANDWIDTH_LIMIT_RESET_TIMER_SECONDS));
}
/**
* Run the task
*/
public function run() {
Application_Model_Preference::resetStationPodcastDownloadCounter();
Application_Model_Preference::setBandwidthLimitResetTimer(microtime(true));
}
}
/**
* Class TaskFactory Factory class to abstract task instantiation
*/

View File

@ -40,7 +40,6 @@ $ccAcl->add(new Zend_Acl_Resource('library'))
->add(new Zend_Acl_Resource('podcast'))
->add(new Zend_Acl_Resource('player'))
->add(new Zend_Acl_Resource('render'))
->add(new Zend_Acl_Resource('soundcloud'))
->add(new Zend_Acl_Resource('embeddablewidgets'))
->add(new Zend_Acl_Resource('setup'))
->add(new Zend_Acl_Resource('feeds'));
@ -67,7 +66,6 @@ $ccAcl->allow('G', 'index')
->allow('G', 'setup')
->allow('G', 'embeddablewidgets')
->allow('G', 'feeds')
->allow('H', 'soundcloud')
->allow('H', 'rest:show-image')
->allow('H', 'rest:media')
->allow('H', 'rest:podcast')

View File

@ -64,13 +64,7 @@ class Config {
$CC_CONFIG['dsn']['database'] = $values['database']['dbname'];
$CC_CONFIG['apiKey'] = array($values['general']['api_key']);
$CC_CONFIG['soundcloud-connection-retries'] = $values['soundcloud']['connection_retries'];
$CC_CONFIG['soundcloud-connection-wait'] = $values['soundcloud']['time_between_retries'];
$CC_CONFIG['soundcloud-client-id'] = $values['soundcloud']['soundcloud_client_id'];
$CC_CONFIG['soundcloud-client-secret'] = $values['soundcloud']['soundcloud_client_secret'];
$CC_CONFIG['soundcloud-redirect-uri'] = $values['soundcloud']['soundcloud_redirect_uri'];
if (isset($values['facebook']['facebook_app_id'])) {
$CC_CONFIG['facebook-app-id'] = $values['facebook']['facebook_app_id'];
$CC_CONFIG['facebook-app-url'] = $values['facebook']['facebook_app_url'];

View File

@ -112,18 +112,12 @@ define('SENTRY_CONFIG_PATH', LIBRETIME_CONF_DIR . '/sentry.airtime_web.ini');
//TuneIn integration
define("TUNEIN_API_URL", "http://air.radiotime.com/Playing.ashx");
// SoundCloud
define('SOUNDCLOUD', 'SoundCloud');
define('DEFAULT_SOUNDCLOUD_LICENSE_TYPE', 'all-rights-reserved');
define('DEFAULT_SOUNDCLOUD_SHARING_TYPE', 'public');
// Celery
define('CELERY_PENDING_STATUS', 'PENDING');
define('CELERY_SUCCESS_STATUS', 'SUCCESS');
define('CELERY_FAILED_STATUS', 'FAILED');
// Celery Services
define('SOUNDCLOUD_SERVICE_NAME', 'soundcloud');
define('PODCAST_SERVICE_NAME', 'podcast');
// Publish Services

View File

@ -26,7 +26,7 @@ class EmbedController extends Zend_Controller_Action
$request = $this->getRequest();
$this->view->playerhtml5_js = "/js/airtime/player/playerhtml5.js?".$CC_CONFIG['airtime_version'];
$this->view->jquery = "/js/libs/jquery-1.10.2.js";
$this->view->jquery = "/js/libs/jquery-1.10.2.min.js";
$this->view->metadata_api_url = "/api/live-info";
$this->view->player_title = json_encode($this->view->escape($request->getParam('title')));
$this->view->jquery_i18n = "/js/i18n/jquery.i18n.js?";
@ -69,18 +69,6 @@ class EmbedController extends Zend_Controller_Action
$this->view->availableDesktopStreams = json_encode($availableDesktopStreams);
}
public function currentDayProgramAction()
{
$this->view->layout()->disableLayout();
$CC_CONFIG = Config::getConfig();
$this->view->css = "/widgets/css/airtime-widgets.css?".$CC_CONFIG['airtime_version'];
$this->view->jquery = "/widgets/js/jquery-1.6.1.min.js?".$CC_CONFIG['airtime_version'];
$this->view->jquery_custom = "/widgets/js/jquery-ui-1.8.10.custom.min.js?".$CC_CONFIG['airtime_version'];
$this->view->widget_js = "/widgets/js/jquery.showinfo.js?".$CC_CONFIG['airtime_version'];
}
public function weeklyProgramAction()
{
$this->view->layout()->disableLayout();
@ -98,7 +86,7 @@ class EmbedController extends Zend_Controller_Action
$this->view->widgetStyle = "basic";
$this->view->css = "/css/embed/weekly-schedule-widget-basic.css?" . $CC_CONFIG['airtime_version'];
}
$this->view->jquery = "/widgets/js/jquery-1.6.1.min.js?".$CC_CONFIG['airtime_version'];
$this->view->jquery = "/js/libs/jquery-1.8.3.min.js?".$CC_CONFIG['airtime_version'];
$weeklyScheduleData = WidgetHelper::getWeekInfoV2();

View File

@ -119,7 +119,7 @@ class LibraryController extends Zend_Controller_Action
if ($isAdminOrPM || $file->getFileOwnerId() == $user->getId()) {
$menu["del"] = array("name"=> _("Delete"), "icon" => "delete", "url" => $baseUrl."library/delete");
$menu["edit"] = array("name"=> _("Edit..."), "icon" => "edit", "url" => $baseUrl."library/edit-file-md/id/{$id}");
$menu["publish"] = array("name"=> _("Publish..."), "icon" => "soundcloud", "url" => $baseUrl."library/publish/id/{$id}");
$menu["publish"] = array("name"=> _("Publish..."), "url" => $baseUrl."library/publish/id/{$id}");
}
// It's important that we always return the parent id (cc_files id)
@ -129,27 +129,6 @@ class LibraryController extends Zend_Controller_Action
$url = $baseUrl."api/get-media/file/$id/download/true";
$menu["download"] = array("name" => _("Download"), "icon" => "download", "url" => $url);
// SOUNDCLOUD MENU OPTION
$ownerId = empty($obj) ? $file->getFileOwnerId() : $obj->getCreatorId();
if ($isAdminOrPM || $ownerId == $user->getId()) {
$soundcloudService = new Application_Service_SoundcloudService();
if ($type === "audioclip" && $soundcloudService->hasAccessToken()) {
$serviceId = $soundcloudService->getServiceId($id);
if (!is_null($file) && $serviceId != 0) {
$trackRef = ThirdPartyTrackReferencesQuery::create()
->filterByDbService(SOUNDCLOUD_SERVICE_NAME)
->findOneByDbFileId($id);
//create a menu separator
$menu["sep1"] = "-----------";
//create a sub menu for Soundcloud actions.
$menu["soundcloud"] = array("name" => _(SOUNDCLOUD), "icon" => "soundcloud", "items" => array());
$menu["soundcloud"]["items"]["view"] = array("name" => _("View track"), "icon" => "soundcloud", "url" => $baseUrl . "soundcloud/view-on-sound-cloud/id/{$id}");
$menu["soundcloud"]["items"]["update"] = array("name" => _("Update track"), "icon" => "soundcloud", "url" => $baseUrl . "soundcloud/update/id/{$trackRef->getDbForeignId()}");
}
}
}
} elseif ($type === "playlist" || $type === "block") {
if ($type === 'playlist') {
$obj = new Application_Model_Playlist($id);

View File

@ -72,7 +72,6 @@ class ListenerstatController extends Zend_Controller_Action
$this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/dataTables.colReorder.min.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'js/datatables/plugin/TableTools-2.1.5/css/TableTools.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/show_analytics.css'.$CC_CONFIG['airtime_version']);

View File

@ -122,12 +122,6 @@ final class LocaleController extends Zend_Controller_Action
"Import" => _("Import"),
"Imported?" => _("Imported?"),
"View" => _("View"),
// SOUNDCLOUD
"Are you sure? SoundCloud stats and comments for this track will be permanently removed." => "Are you sure? SoundCloud stats and comments for this track will be permanently removed.",
"Your track is being deleted from SoundCloud" => "Your track is being deleted from SoundCloud",
"Your track is being uploaded and will appear on SoundCloud in a couple of minutes" => "Your track is being uploaded and will appear on SoundCloud in a couple of minutes",
"The soundcloud id for this file is: " => _("The soundcloud id for this file is: "),
"There was an error while uploading to soundcloud." => _("There was an error while uploading to soundcloud."),
"Error code: " => _("Error code: "),
"Error msg: " => _("Error msg: "),
"Input must be a positive number" => _("Input must be a positive number"),
@ -229,11 +223,6 @@ final class LocaleController extends Zend_Controller_Action
"60m" => _("60m"),
"Uploading in progress..." => _("Uploading in progress..."),
"Retreiving data from the server..." => _("Retreiving data from the server..."),
//already in library/library.js
//"The soundcloud id for this file is: " => _("The soundcloud id for this file is: "),
//"There was error while uploading to soundcloud." => _("There was error while uploading to soundcloud."),
//"Error code: " => _("Error code: "),
//"Error msg: " => _("Error msg: "),
"This show has no scheduled content." => _("This show has no scheduled content."),
"This show is not completely filled with content." => _("This show is not completely filled with content."),
//already in schedule/add-show.js
@ -436,7 +425,6 @@ final class LocaleController extends Zend_Controller_Action
": activate to sort column ascending",
": activate to sort column descending",
//End of datatables
"Welcome to the new Airtime Pro!" => _("Welcome to the new Airtime Pro!"),
//New entries from .js "" => _(""),
"First" => _("First"),

View File

@ -46,17 +46,17 @@ class PlayouthistoryController extends Zend_Controller_Action
$this->view->headScript()->appendFile($baseUrl.'js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/bootstrap-datetime/bootstrap-datetimepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/libs/CSVexport.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/libs/pdfmake.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/libs/vfs_fonts.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/historytable.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headLink()->appendStylesheet($baseUrl.'css/bootstrap-datetimepicker.min.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'js/datatables/plugin/TableTools-2.1.5/css/TableTools.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/playouthistory.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']);

View File

@ -56,6 +56,7 @@ class PreferenceController extends Zend_Controller_Action
Application_Model_Preference::SetDefaultTimezone($values["timezone"]);
Application_Model_Preference::SetWeekStartDay($values["weekStartDay"]);
Application_Model_Preference::setRadioPageDisplayLoginButton($values["radioPageLoginButton"]);
Application_Model_Preference::SetFeaturePreviewMode($values["featurePreviewMode"]);
$logoUploadElement = $form->getSubForm('preferences_general')->getElement('stationLogo');
$logoUploadElement->receive();
@ -71,12 +72,6 @@ class PreferenceController extends Zend_Controller_Action
Application_Model_Preference::setTuneinPartnerKey($values["tunein_partner_key"]);
Application_Model_Preference::setTuneinPartnerId($values["tunein_partner_id"]);
// SoundCloud Preferences
if (array_key_exists('SoundCloudLicense', $values)) {
Application_Model_Preference::setDefaultSoundCloudLicenseType($values["SoundCloudLicense"]);
Application_Model_Preference::setDefaultSoundCloudSharingType($values["SoundCloudSharing"]);
}
$this->view->statusMsg = "<div class='success'>". _("Preferences updated.")."</div>";
$form = new Application_Form_Preferences();
$this->view->form = $form;

View File

@ -75,6 +75,11 @@ class ScheduleController extends Zend_Controller_Action
$this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/colorpicker/js/colorpicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
// This block needs to be added before the add-show.js script
$this->view->headScript()->appendFile($baseUrl.'js/libs/dayjs.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/libs/utc.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/libs/timezone.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/schedule/add-show.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->offsetSetFile(100, $baseUrl.'js/airtime/schedule/schedule.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/blockui/jquery.blockUI.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
@ -89,8 +94,6 @@ class ScheduleController extends Zend_Controller_Action
$headScript = $this->view->headScript();
AirtimeTableView::injectTableJavaScriptDependencies($headScript, $baseUrl, $CC_CONFIG['airtime_version']);
$this->view->headScript()->appendFile($baseUrl.'js/libs/moment.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/libs/moment-timezone.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript');

View File

@ -52,7 +52,9 @@ class ShowbuilderController extends Zend_Controller_Action
$this->view->headScript()->appendFile($baseUrl.'js/airtime/showbuilder/main_builder.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
// MEDIA BUILDER
$this->view->headScript()->appendFile($baseUrl.'js/js-timezone-detect/jstz-1.0.4.min.js','text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/libs/dayjs.min.js','text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/libs/utc.min.js','text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/libs/timezone.min.js','text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/library/spl.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/library/podcast.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/library/publish.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');

View File

@ -1,116 +0,0 @@
<?php
class SoundcloudController extends ThirdPartyController implements OAuth2Controller {
/**
* @var Application_Service_SoundcloudService
*/
protected $_service;
/**
* Set up SoundCloud access variables.
*
* @return void
*/
public function init() {
parent::init();
$this->_service = new Application_Service_SoundcloudService();
}
/**
* Upload the file with the given id to SoundCloud
*
* @return void
*
* @throws Zend_Controller_Response_Exception thrown if upload fails for any reason
*/
public function uploadAction() {
$id = $this->getRequest()->getParam('id');
$this->_service->upload($id);
}
/**
* Update the file with the given id on SoundCloud
*
* @return void
*
* @throws Zend_Controller_Response_Exception thrown if upload fails for any reason
*/
public function updateAction() {
$id = $this->getRequest()->getParam('id');
$this->_service->update($id);
}
/**
* Download the file with the given id from SoundCloud
*
* @return void
*
* @throws Zend_Controller_Response_Exception thrown if download fails for any reason
*/
public function downloadAction() {
$id = $this->getRequest()->getParam('id');
$this->_service->download($id);
}
/**
* Delete the file with the given id from SoundCloud
*
* @return void
*
* @throws Zend_Controller_Response_Exception thrown if deletion fails for any reason
*/
public function deleteAction() {
$id = $this->getRequest()->getParam('id');
$this->_service->delete($id);
}
/**
* Send user to SoundCloud to authorize before being redirected
*
* @return void
*/
public function authorizeAction() {
$auth_url = $this->_service->getAuthorizeUrl();
header('Location: ' . $auth_url);
}
/**
* Clear the previously saved request token from preferences
*
* @return void
*/
public function deauthorizeAction() {
Application_Model_Preference::setSoundCloudRequestToken("");
header('Location: ' . $this->_baseUrl . 'preference'); // Redirect back to the preference page
}
/**
* Called when user successfully completes SoundCloud authorization
* Store the returned request token for future requests
*
* @return void
*/
public function redirectAction() {
$code = $_GET['code'];
$this->_service->requestNewAccessToken($code);
header('Location: ' . $this->_baseUrl . 'preference'); // Redirect back to the preference page
}
/**
* Fetch the permalink to a file on SoundCloud and redirect to it.
*
* @return void
*/
public function viewOnSoundCloudAction() {
$id = $this->getRequest()->getParam('id');
try {
$soundcloudLink = $this->_service->getLinkToFile($id);
header('Location: ' . $soundcloudLink);
} catch (Soundcloud\Exception\InvalidHttpResponseCodeException $e) {
// Redirect to a 404 so the user knows something went wrong
header('Location: ' . $this->_baseUrl . 'error/error-404');
}
}
}

View File

@ -0,0 +1,6 @@
-- we can restore the schema here but you'll need to restore data from a backup
ALTER TABLE cc_files ADD COLUMN soundcloud_id INTEGER;
ALTER TABLE cc_files ADD COLUMN soundcloud_error_code INTEGER;
ALTER TABLE cc_files ADD COLUMN soundcloud_error_msg VARCHAR(512);
ALTER TABLE cc_files ADD COLUMN soundcloud_link_to_file VARCHAR(4096);
ALTER TABLE cc_files ADD COLUMN soundcloud_upload_time TIMESTAMP(6);

View File

@ -189,10 +189,9 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
$view->headScript()->appendFile($baseUrl . 'js/libs/jquery-1.8.3.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
->appendFile($baseUrl . 'js/libs/jquery-ui-1.8.24.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
->appendFile($baseUrl . 'js/libs/angular.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
->appendFile($baseUrl . 'js/bootstrap/bootstrap.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
->appendFile($baseUrl . 'js/bootstrap/bootstrap.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
->appendFile($baseUrl . 'js/libs/underscore-min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
// ->appendFile($baseUrl . 'js/libs/jquery.stickyPanel.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
->appendFile($baseUrl . 'js/qtip/jquery.qtip.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
->appendFile($baseUrl . 'js/jplayer/jquery.jplayer.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
->appendFile($baseUrl . 'js/sprintf/sprintf-0.7-beta1.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')

View File

@ -0,0 +1,5 @@
ALTER TABLE cc_files DROP COLUMN soundcloud_id;
ALTER TABLE cc_files DROP COLUMN soundcloud_error_code;
ALTER TABLE cc_files DROP COLUMN soundcloud_error_msg;
ALTER TABLE cc_files DROP COLUMN soundcloud_link_to_file;
ALTER TABLE cc_files DROP COLUMN soundcloud_upload_time;

View File

@ -210,6 +210,21 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
$radioPageLoginButton->setLabel(_("Display login button on your Radio Page?"));
$radioPageLoginButton->setValue($displayRadioPageLoginButtonValue);
$this->addElement($radioPageLoginButton);
$feature_preview_mode = new Zend_Form_Element_Radio('featurePreviewMode');
$feature_preview_mode->setLabel(_('Feature Previews'));
$feature_preview_mode->setMultiOptions(array(
_("Disabled"),
_("Enabled"),
));
$feature_preview_mode->setValue(Application_Model_Preference::GetFeaturePreviewMode());
$feature_preview_mode->setDescription(_('Enable this to opt-in to test new features.'));
$feature_preview_mode->setSeparator(' '); //No <br> between radio buttons
$feature_preview_mode->addDecorator('HtmlTag', array('tag' => 'dd',
'id'=>"featurePreviewMode-element",
'class' => 'radio-inline-list',
));
$this->addElement($feature_preview_mode);
}
private function getWeekStartDays()

View File

@ -30,9 +30,6 @@ class Application_Form_Preferences extends Zend_Form
$tuneinPreferences = new Application_Form_TuneInPreferences();
$this->addSubForm($tuneinPreferences, 'preferences_tunein');
$soundcloud_pref = new Application_Form_SoundCloudPreferences();
$this->addSubForm($soundcloud_pref, 'preferences_soundcloud');
$danger_pref = new Application_Form_DangerousPreferences();
$this->addSubForm($danger_pref, 'preferences_danger');

View File

@ -1,58 +0,0 @@
<?php
require_once 'customvalidators/ConditionalNotEmpty.php';
class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm
{
public function init()
{
$this->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/preferences_soundcloud.phtml'))
));
$select = new Zend_Form_Element_Select('SoundCloudLicense');
$select->setLabel(_('Default License:'));
$select->setAttrib('class', 'input_select');
$select->setMultiOptions(array(
"all-rights-reserved" => _("All rights are reserved"),
"no-rights-reserved" => _("The work is in the public domain"),
"cc-by" => _("Creative Commons Attribution"),
"cc-by-nc" => _("Creative Commons Attribution Noncommercial"),
"cc-by-nd" => _("Creative Commons Attribution No Derivative Works"),
"cc-by-sa" => _("Creative Commons Attribution Share Alike"),
"cc-by-nc-nd" => _("Creative Commons Attribution Noncommercial Non Derivate Works"),
"cc-by-nc-sa" => _("Creative Commons Attribution Noncommercial Share Alike")
));
$select->setRequired(false);
$select->setValue(Application_Model_Preference::getDefaultSoundCloudLicenseType());
$this->addElement($select);
$select = new Zend_Form_Element_Select('SoundCloudSharing');
$select->setLabel(_('Default Sharing Type:'));
$select->setAttrib('class', 'input_select');
$select->setMultiOptions(array(
"public" => _("Public"),
"private" => _("Private"),
));
$select->setRequired(false);
$select->setValue(Application_Model_Preference::getDefaultSoundCloudSharingType());
$this->addElement($select);
$this->addElement('image', 'SoundCloudConnect', array(
'src' => 'http://connect.soundcloud.com/2/btn-connect-sc-l.png',
'decorators' => array(
'ViewHelper'
)
));
$this->addElement('image', 'SoundCloudDisconnect', array(
'src' => 'http://connect.soundcloud.com/2/btn-disconnect-l.png',
'decorators' => array(
'ViewHelper'
)
));
}
}

View File

@ -182,7 +182,7 @@
$(document).ready(function() {
var whatsnew = $("#whatsnew");
whatsnew.dialog({
title: $.i18n._("Welcome to the new Airtime Pro!"),
title: $.i18n._("Welcome to the Libretime!"),
width: "auto",
height: "auto",
modal: true,

View File

@ -1389,38 +1389,6 @@ class Application_Model_Preference
self::setValue("last_tunein_metadata_update", $value);
}
/* Third Party */
// SoundCloud
public static function getDefaultSoundCloudLicenseType() {
$val = self::getValue("soundcloud_license_type");
// If we don't have a value set, return all-rights-reserved by default
return empty($val) ? DEFAULT_SOUNDCLOUD_LICENSE_TYPE : $val;
}
public static function setDefaultSoundCloudLicenseType($value) {
self::setValue("soundcloud_license_type", $value);
}
public static function getDefaultSoundCloudSharingType() {
$val = self::getValue("soundcloud_sharing_type");
// If we don't have a value set, return public by default
return empty($val) ? DEFAULT_SOUNDCLOUD_SHARING_TYPE : $val;
}
public static function setDefaultSoundCloudSharingType($value) {
self::setValue("soundcloud_sharing_type", $value);
}
public static function getSoundCloudRequestToken() {
return self::getValue("soundcloud_request_token");
}
public static function setSoundCloudRequestToken($value) {
self::setValue("soundcloud_request_token", $value);
}
// TaskManager Lock Timestamp
public static function getTaskManagerLock() {
@ -1573,68 +1541,6 @@ class Application_Model_Preference
self::setValue("station_podcast_privacy", $value);
}
/**
* Accessors for station bandwidth limit.
*/
public static function getBandwidthLimit() {
return self::getValue("bandwidth_limit");
}
public static function setBandwidthLimit($value) {
self::setValue("bandwidth_limit", $value);
}
/**
* Accessors for bandwidth limit counter.
* Tracks bandwidth usage.
*
* @see ApiController::bandwidthUsageAction()
* @see BandwidthLimitTask
*/
public static function getBandwidthLimitCounter() {
return self::getValue("bandwidth_limit_counter");
}
public static function incrementBandwidthLimitCounter($value) {
$counter = intval(self::getValue("bandwidth_limit_counter"));
self::setValue("bandwidth_limit_counter", $counter + intval($value));
}
public static function resetBandwidthLimitCounter() {
self::setValue("bandwidth_limit_counter", 0);
}
/**
* Accessors for bandwidth limit reset timer.
* Used to determine when to reset the bandwidth counter for the station.
*
* @see BandwidthLimitTask
*/
public static function getBandwidthLimitResetTimer() {
return self::getValue("bandwidth_limit_reset_timer");
}
public static function setBandwidthLimitResetTimer($value) {
self::setValue("bandwidth_limit_reset_timer", $value);
}
/**
* Accessors for bandwidth limit update timer.
* Used to determine when the bandwidth was last updated for this station.
*
* @see ApiController::bandwidthUsageAction()
*/
public static function getBandwidthLimitUpdateTimer() {
return self::getValue("bandwidth_limit_update_timer");
}
public static function setBandwidthLimitUpdateTimer() {
self::setValue("bandwidth_limit_update_timer", microtime(true));
}
/**
* Getter for CORS URLs
*
@ -1653,4 +1559,23 @@ class Application_Model_Preference
public static function SetAllowedCorsUrls($value) {
self::setValue('allowed_cors_urls', $value);
}
/**
* Getter for feature preview mode.
*
* @return bool
*/
public static function GetFeaturePreviewMode() {
return self::getValue('feature_preview_mode') === '1';
}
/**
* Setter for feature preview mode.
*
* @param bool $value
* @return void
*/
public static function SetFeaturePreviewMode($value) {
return self::setValue('feature_preview_mode', $value);
}
}

View File

@ -456,8 +456,7 @@ SQL;
ft.album_title AS file_album_title,
ft.length AS file_length,
ft.file_exists AS file_exists,
ft.mime AS file_mime,
ft.soundcloud_id AS soundcloud_id
ft.mime AS file_mime
SQL;
$filesJoin = <<<SQL
cc_schedule AS sched
@ -492,8 +491,7 @@ SQL;
ws.description AS file_album_title,
ws.length AS file_length,
't'::BOOL AS file_exists,
ws.mime AS file_mime,
(SELECT NULL::integer AS soundcloud_id)
ws.mime AS file_mime
SQL;
$streamJoin = <<<SQL
cc_schedule AS sched

View File

@ -946,12 +946,10 @@ SELECT si1.starts AS starts,
si1.description AS instance_description,
si1.created AS created,
si1.last_scheduled AS last_scheduled,
si1.time_filled AS time_filled,
f.soundcloud_id
si1.time_filled AS time_filled
FROM cc_show_instances AS si1
LEFT JOIN cc_show_instances AS si2 ON si1.instance_id = si2.id
LEFT JOIN cc_show AS show ON show.id = si1.show_id
LEFT JOIN cc_files AS f ON f.id = si1.file_id
WHERE si1.modified_instance = FALSE
SQL;
//only want shows that are starting at the time or later.
@ -1081,8 +1079,6 @@ SQL;
$event["linked"] = intval($show["linked"]);
$event["record"] = intval($show["record"]);
$event["rebroadcast"] = intval($show["rebroadcast"]);
$event["soundcloud_id"] = is_null($show["soundcloud_id"])
? -1 : $show["soundcloud_id"];
//for putting the now playing icon on the show.
if ($now > $startsDT && $now < $endsDT) {

View File

@ -916,14 +916,14 @@ SQL;
* 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,
* This is done in PHP here on the web server rather than in libretime-analyzer because
* the libretime-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 libretime-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
* before they're processed by libretime-analyzer, which then moves them to "stor/imported" in the final
* step.
*
* @param string $tempFilePath

View File

@ -44,7 +44,6 @@ class CcFiles extends BaseCcFiles {
'utime',
'lptime',
'silan_check',
'soundcloud_id',
'is_scheduled',
'is_playlist'
);

View File

@ -96,11 +96,6 @@ class CcFilesTableMap extends TableMap
$this->addColumn('contributor', 'DbContributor', 'VARCHAR', false, 512, null);
$this->addColumn('language', 'DbLanguage', 'VARCHAR', false, 512, null);
$this->addColumn('file_exists', 'DbFileExists', 'BOOLEAN', false, null, true);
$this->addColumn('soundcloud_id', 'DbSoundcloudId', 'INTEGER', false, null, null);
$this->addColumn('soundcloud_error_code', 'DbSoundcloudErrorCode', 'INTEGER', false, null, null);
$this->addColumn('soundcloud_error_msg', 'DbSoundcloudErrorMsg', 'VARCHAR', false, 512, null);
$this->addColumn('soundcloud_link_to_file', 'DbSoundcloudLinkToFile', 'VARCHAR', false, 4096, null);
$this->addColumn('soundcloud_upload_time', 'DbSoundCloundUploadTime', 'TIMESTAMP', false, 6, null);
$this->addColumn('replay_gain', 'DbReplayGain', 'NUMERIC', false, null, null);
$this->addForeignKey('owner_id', 'DbOwnerId', 'INTEGER', 'cc_subjs', 'id', false, null, null);
$this->addColumn('cuein', 'DbCuein', 'VARCHAR', false, null, '00:00:00');

View File

@ -391,36 +391,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
protected $file_exists;
/**
* The value for the soundcloud_id field.
* @var int
*/
protected $soundcloud_id;
/**
* The value for the soundcloud_error_code field.
* @var int
*/
protected $soundcloud_error_code;
/**
* The value for the soundcloud_error_msg field.
* @var string
*/
protected $soundcloud_error_msg;
/**
* The value for the soundcloud_link_to_file field.
* @var string
*/
protected $soundcloud_link_to_file;
/**
* The value for the soundcloud_upload_time field.
* @var string
*/
protected $soundcloud_upload_time;
/**
* The value for the replay_gain field.
* @var string
@ -1375,85 +1345,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->file_exists;
}
/**
* Get the [soundcloud_id] column value.
*
* @return int
*/
public function getDbSoundcloudId()
{
return $this->soundcloud_id;
}
/**
* Get the [soundcloud_error_code] column value.
*
* @return int
*/
public function getDbSoundcloudErrorCode()
{
return $this->soundcloud_error_code;
}
/**
* Get the [soundcloud_error_msg] column value.
*
* @return string
*/
public function getDbSoundcloudErrorMsg()
{
return $this->soundcloud_error_msg;
}
/**
* Get the [soundcloud_link_to_file] column value.
*
* @return string
*/
public function getDbSoundcloudLinkToFile()
{
return $this->soundcloud_link_to_file;
}
/**
* Get the [optionally formatted] temporal [soundcloud_upload_time] column value.
*
*
* @param string $format The date/time format string (either date()-style or strftime()-style).
* If format is null, then the raw DateTime object will be returned.
* @return mixed Formatted date/time value as string or DateTime object (if format is null), null if column is null
* @throws PropelException - if unable to parse/validate the date/time value.
*/
public function getDbSoundCloundUploadTime($format = 'Y-m-d H:i:s')
{
if ($this->soundcloud_upload_time === null) {
return null;
}
try {
$dt = new DateTime($this->soundcloud_upload_time);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->soundcloud_upload_time, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
* Get the [replay_gain] column value.
*
@ -2823,113 +2714,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this;
} // setDbFileExists()
/**
* Set the value of [soundcloud_id] column.
*
* @param int $v new value
* @return CcFiles The current object (for fluent API support)
*/
public function setDbSoundcloudId($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->soundcloud_id !== $v) {
$this->soundcloud_id = $v;
$this->modifiedColumns[] = CcFilesPeer::SOUNDCLOUD_ID;
}
return $this;
} // setDbSoundcloudId()
/**
* Set the value of [soundcloud_error_code] column.
*
* @param int $v new value
* @return CcFiles The current object (for fluent API support)
*/
public function setDbSoundcloudErrorCode($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->soundcloud_error_code !== $v) {
$this->soundcloud_error_code = $v;
$this->modifiedColumns[] = CcFilesPeer::SOUNDCLOUD_ERROR_CODE;
}
return $this;
} // setDbSoundcloudErrorCode()
/**
* Set the value of [soundcloud_error_msg] column.
*
* @param string $v new value
* @return CcFiles The current object (for fluent API support)
*/
public function setDbSoundcloudErrorMsg($v)
{
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
if ($this->soundcloud_error_msg !== $v) {
$this->soundcloud_error_msg = $v;
$this->modifiedColumns[] = CcFilesPeer::SOUNDCLOUD_ERROR_MSG;
}
return $this;
} // setDbSoundcloudErrorMsg()
/**
* Set the value of [soundcloud_link_to_file] column.
*
* @param string $v new value
* @return CcFiles The current object (for fluent API support)
*/
public function setDbSoundcloudLinkToFile($v)
{
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
if ($this->soundcloud_link_to_file !== $v) {
$this->soundcloud_link_to_file = $v;
$this->modifiedColumns[] = CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE;
}
return $this;
} // setDbSoundcloudLinkToFile()
/**
* Sets the value of [soundcloud_upload_time] column to a normalized version of the date/time value specified.
*
* @param mixed $v string, integer (timestamp), or DateTime value.
* Empty strings are treated as null.
* @return CcFiles The current object (for fluent API support)
*/
public function setDbSoundCloundUploadTime($v)
{
$dt = PropelDateTime::newInstance($v, null, 'DateTime');
if ($this->soundcloud_upload_time !== null || $dt !== null) {
$currentDateAsString = ($this->soundcloud_upload_time !== null && $tmpDt = new DateTime($this->soundcloud_upload_time)) ? $tmpDt->format('Y-m-d H:i:s') : null;
$newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
if ($currentDateAsString !== $newDateAsString) {
$this->soundcloud_upload_time = $newDateAsString;
$this->modifiedColumns[] = CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME;
}
} // if either are not null
return $this;
} // setDbSoundCloundUploadTime()
/**
* Set the value of [replay_gain] column.
*
@ -3325,23 +3109,18 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->contributor = ($row[$startcol + 54] !== null) ? (string) $row[$startcol + 54] : null;
$this->language = ($row[$startcol + 55] !== null) ? (string) $row[$startcol + 55] : null;
$this->file_exists = ($row[$startcol + 56] !== null) ? (boolean) $row[$startcol + 56] : null;
$this->soundcloud_id = ($row[$startcol + 57] !== null) ? (int) $row[$startcol + 57] : null;
$this->soundcloud_error_code = ($row[$startcol + 58] !== null) ? (int) $row[$startcol + 58] : null;
$this->soundcloud_error_msg = ($row[$startcol + 59] !== null) ? (string) $row[$startcol + 59] : null;
$this->soundcloud_link_to_file = ($row[$startcol + 60] !== null) ? (string) $row[$startcol + 60] : null;
$this->soundcloud_upload_time = ($row[$startcol + 61] !== null) ? (string) $row[$startcol + 61] : null;
$this->replay_gain = ($row[$startcol + 62] !== null) ? (string) $row[$startcol + 62] : null;
$this->owner_id = ($row[$startcol + 63] !== null) ? (int) $row[$startcol + 63] : null;
$this->cuein = ($row[$startcol + 64] !== null) ? (string) $row[$startcol + 64] : null;
$this->cueout = ($row[$startcol + 65] !== null) ? (string) $row[$startcol + 65] : null;
$this->silan_check = ($row[$startcol + 66] !== null) ? (boolean) $row[$startcol + 66] : null;
$this->hidden = ($row[$startcol + 67] !== null) ? (boolean) $row[$startcol + 67] : null;
$this->is_scheduled = ($row[$startcol + 68] !== null) ? (boolean) $row[$startcol + 68] : null;
$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->track_type = ($row[$startcol + 73] !== null) ? (string) $row[$startcol + 73] : null;
$this->replay_gain = ($row[$startcol + 57] !== null) ? (string) $row[$startcol + 57] : null;
$this->owner_id = ($row[$startcol + 58] !== null) ? (int) $row[$startcol + 58] : null;
$this->cuein = ($row[$startcol + 59] !== null) ? (string) $row[$startcol + 59] : null;
$this->cueout = ($row[$startcol + 60] !== null) ? (string) $row[$startcol + 60] : null;
$this->silan_check = ($row[$startcol + 61] !== null) ? (boolean) $row[$startcol + 61] : null;
$this->hidden = ($row[$startcol + 62] !== null) ? (boolean) $row[$startcol + 62] : null;
$this->is_scheduled = ($row[$startcol + 63] !== null) ? (boolean) $row[$startcol + 63] : null;
$this->is_playlist = ($row[$startcol + 64] !== null) ? (boolean) $row[$startcol + 64] : null;
$this->filesize = ($row[$startcol + 65] !== null) ? (int) $row[$startcol + 65] : null;
$this->description = ($row[$startcol + 66] !== null) ? (string) $row[$startcol + 66] : null;
$this->artwork = ($row[$startcol + 67] !== null) ? (string) $row[$startcol + 67] : null;
$this->track_type = ($row[$startcol + 68] !== null) ? (string) $row[$startcol + 68] : null;
$this->resetModified();
$this->setNew(false);
@ -3351,7 +3130,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
}
$this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 72; // 72 = CcFilesPeer::NUM_HYDRATE_COLUMNS.
return $startcol + 69; // 69 = CcFilesPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
throw new PropelException("Error populating CcFiles object", $e);
@ -3934,21 +3713,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
if ($this->isColumnModified(CcFilesPeer::FILE_EXISTS)) {
$modifiedColumns[':p' . $index++] = '"file_exists"';
}
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ID)) {
$modifiedColumns[':p' . $index++] = '"soundcloud_id"';
}
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ERROR_CODE)) {
$modifiedColumns[':p' . $index++] = '"soundcloud_error_code"';
}
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ERROR_MSG)) {
$modifiedColumns[':p' . $index++] = '"soundcloud_error_msg"';
}
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE)) {
$modifiedColumns[':p' . $index++] = '"soundcloud_link_to_file"';
}
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME)) {
$modifiedColumns[':p' . $index++] = '"soundcloud_upload_time"';
}
if ($this->isColumnModified(CcFilesPeer::REPLAY_GAIN)) {
$modifiedColumns[':p' . $index++] = '"replay_gain"';
}
@ -4167,21 +3931,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
case '"file_exists"':
$stmt->bindValue($identifier, $this->file_exists, PDO::PARAM_BOOL);
break;
case '"soundcloud_id"':
$stmt->bindValue($identifier, $this->soundcloud_id, PDO::PARAM_INT);
break;
case '"soundcloud_error_code"':
$stmt->bindValue($identifier, $this->soundcloud_error_code, PDO::PARAM_INT);
break;
case '"soundcloud_error_msg"':
$stmt->bindValue($identifier, $this->soundcloud_error_msg, PDO::PARAM_STR);
break;
case '"soundcloud_link_to_file"':
$stmt->bindValue($identifier, $this->soundcloud_link_to_file, PDO::PARAM_STR);
break;
case '"soundcloud_upload_time"':
$stmt->bindValue($identifier, $this->soundcloud_upload_time, PDO::PARAM_STR);
break;
case '"replay_gain"':
$stmt->bindValue($identifier, $this->replay_gain, PDO::PARAM_INT);
break;
@ -4605,54 +4354,39 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->getDbFileExists();
break;
case 57:
return $this->getDbSoundcloudId();
break;
case 58:
return $this->getDbSoundcloudErrorCode();
break;
case 59:
return $this->getDbSoundcloudErrorMsg();
break;
case 60:
return $this->getDbSoundcloudLinkToFile();
break;
case 61:
return $this->getDbSoundCloundUploadTime();
break;
case 62:
return $this->getDbReplayGain();
break;
case 63:
case 58:
return $this->getDbOwnerId();
break;
case 64:
case 59:
return $this->getDbCuein();
break;
case 65:
case 60:
return $this->getDbCueout();
break;
case 66:
case 61:
return $this->getDbSilanCheck();
break;
case 67:
case 62:
return $this->getDbHidden();
break;
case 68:
case 63:
return $this->getDbIsScheduled();
break;
case 69:
case 64:
return $this->getDbIsPlaylist();
break;
case 70:
case 65:
return $this->getDbFilesize();
break;
case 71:
case 66:
return $this->getDbDescription();
break;
case 72:
case 67:
return $this->getDbArtwork();
break;
case 73:
case 68:
return $this->getDbTrackType();
break;
default:
@ -4741,23 +4475,18 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$keys[54] => $this->getDbContributor(),
$keys[55] => $this->getDbLanguage(),
$keys[56] => $this->getDbFileExists(),
$keys[57] => $this->getDbSoundcloudId(),
$keys[58] => $this->getDbSoundcloudErrorCode(),
$keys[59] => $this->getDbSoundcloudErrorMsg(),
$keys[60] => $this->getDbSoundcloudLinkToFile(),
$keys[61] => $this->getDbSoundCloundUploadTime(),
$keys[62] => $this->getDbReplayGain(),
$keys[63] => $this->getDbOwnerId(),
$keys[64] => $this->getDbCuein(),
$keys[65] => $this->getDbCueout(),
$keys[66] => $this->getDbSilanCheck(),
$keys[67] => $this->getDbHidden(),
$keys[68] => $this->getDbIsScheduled(),
$keys[69] => $this->getDbIsPlaylist(),
$keys[70] => $this->getDbFilesize(),
$keys[71] => $this->getDbDescription(),
$keys[72] => $this->getDbArtwork(),
$keys[73] => $this->getDbTrackType(),
$keys[57] => $this->getDbReplayGain(),
$keys[58] => $this->getDbOwnerId(),
$keys[59] => $this->getDbCuein(),
$keys[60] => $this->getDbCueout(),
$keys[61] => $this->getDbSilanCheck(),
$keys[62] => $this->getDbHidden(),
$keys[63] => $this->getDbIsScheduled(),
$keys[64] => $this->getDbIsPlaylist(),
$keys[65] => $this->getDbFilesize(),
$keys[66] => $this->getDbDescription(),
$keys[67] => $this->getDbArtwork(),
$keys[68] => $this->getDbTrackType(),
);
$virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) {
@ -5004,54 +4733,39 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->setDbFileExists($value);
break;
case 57:
$this->setDbSoundcloudId($value);
break;
case 58:
$this->setDbSoundcloudErrorCode($value);
break;
case 59:
$this->setDbSoundcloudErrorMsg($value);
break;
case 60:
$this->setDbSoundcloudLinkToFile($value);
break;
case 61:
$this->setDbSoundCloundUploadTime($value);
break;
case 62:
$this->setDbReplayGain($value);
break;
case 63:
case 58:
$this->setDbOwnerId($value);
break;
case 64:
case 59:
$this->setDbCuein($value);
break;
case 65:
case 60:
$this->setDbCueout($value);
break;
case 66:
case 61:
$this->setDbSilanCheck($value);
break;
case 67:
case 62:
$this->setDbHidden($value);
break;
case 68:
case 63:
$this->setDbIsScheduled($value);
break;
case 69:
case 64:
$this->setDbIsPlaylist($value);
break;
case 70:
case 65:
$this->setDbFilesize($value);
break;
case 71:
case 66:
$this->setDbDescription($value);
break;
case 72:
case 67:
$this->setDbArtwork($value);
break;
case 73:
case 68:
$this->setDbTrackType($value);
break;
} // switch()
@ -5135,23 +4849,18 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
if (array_key_exists($keys[54], $arr)) $this->setDbContributor($arr[$keys[54]]);
if (array_key_exists($keys[55], $arr)) $this->setDbLanguage($arr[$keys[55]]);
if (array_key_exists($keys[56], $arr)) $this->setDbFileExists($arr[$keys[56]]);
if (array_key_exists($keys[57], $arr)) $this->setDbSoundcloudId($arr[$keys[57]]);
if (array_key_exists($keys[58], $arr)) $this->setDbSoundcloudErrorCode($arr[$keys[58]]);
if (array_key_exists($keys[59], $arr)) $this->setDbSoundcloudErrorMsg($arr[$keys[59]]);
if (array_key_exists($keys[60], $arr)) $this->setDbSoundcloudLinkToFile($arr[$keys[60]]);
if (array_key_exists($keys[61], $arr)) $this->setDbSoundCloundUploadTime($arr[$keys[61]]);
if (array_key_exists($keys[62], $arr)) $this->setDbReplayGain($arr[$keys[62]]);
if (array_key_exists($keys[63], $arr)) $this->setDbOwnerId($arr[$keys[63]]);
if (array_key_exists($keys[64], $arr)) $this->setDbCuein($arr[$keys[64]]);
if (array_key_exists($keys[65], $arr)) $this->setDbCueout($arr[$keys[65]]);
if (array_key_exists($keys[66], $arr)) $this->setDbSilanCheck($arr[$keys[66]]);
if (array_key_exists($keys[67], $arr)) $this->setDbHidden($arr[$keys[67]]);
if (array_key_exists($keys[68], $arr)) $this->setDbIsScheduled($arr[$keys[68]]);
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]]);
if (array_key_exists($keys[73], $arr)) $this->setDbTrackType($arr[$keys[73]]);
if (array_key_exists($keys[57], $arr)) $this->setDbReplayGain($arr[$keys[57]]);
if (array_key_exists($keys[58], $arr)) $this->setDbOwnerId($arr[$keys[58]]);
if (array_key_exists($keys[59], $arr)) $this->setDbCuein($arr[$keys[59]]);
if (array_key_exists($keys[60], $arr)) $this->setDbCueout($arr[$keys[60]]);
if (array_key_exists($keys[61], $arr)) $this->setDbSilanCheck($arr[$keys[61]]);
if (array_key_exists($keys[62], $arr)) $this->setDbHidden($arr[$keys[62]]);
if (array_key_exists($keys[63], $arr)) $this->setDbIsScheduled($arr[$keys[63]]);
if (array_key_exists($keys[64], $arr)) $this->setDbIsPlaylist($arr[$keys[64]]);
if (array_key_exists($keys[65], $arr)) $this->setDbFilesize($arr[$keys[65]]);
if (array_key_exists($keys[66], $arr)) $this->setDbDescription($arr[$keys[66]]);
if (array_key_exists($keys[67], $arr)) $this->setDbArtwork($arr[$keys[67]]);
if (array_key_exists($keys[68], $arr)) $this->setDbTrackType($arr[$keys[68]]);
}
/**
@ -5220,11 +4929,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
if ($this->isColumnModified(CcFilesPeer::CONTRIBUTOR)) $criteria->add(CcFilesPeer::CONTRIBUTOR, $this->contributor);
if ($this->isColumnModified(CcFilesPeer::LANGUAGE)) $criteria->add(CcFilesPeer::LANGUAGE, $this->language);
if ($this->isColumnModified(CcFilesPeer::FILE_EXISTS)) $criteria->add(CcFilesPeer::FILE_EXISTS, $this->file_exists);
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ID)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ID, $this->soundcloud_id);
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ERROR_CODE)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ERROR_CODE, $this->soundcloud_error_code);
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ERROR_MSG)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ERROR_MSG, $this->soundcloud_error_msg);
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE)) $criteria->add(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE, $this->soundcloud_link_to_file);
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME)) $criteria->add(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME, $this->soundcloud_upload_time);
if ($this->isColumnModified(CcFilesPeer::REPLAY_GAIN)) $criteria->add(CcFilesPeer::REPLAY_GAIN, $this->replay_gain);
if ($this->isColumnModified(CcFilesPeer::OWNER_ID)) $criteria->add(CcFilesPeer::OWNER_ID, $this->owner_id);
if ($this->isColumnModified(CcFilesPeer::CUEIN)) $criteria->add(CcFilesPeer::CUEIN, $this->cuein);
@ -5356,11 +5060,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$copyObj->setDbContributor($this->getDbContributor());
$copyObj->setDbLanguage($this->getDbLanguage());
$copyObj->setDbFileExists($this->getDbFileExists());
$copyObj->setDbSoundcloudId($this->getDbSoundcloudId());
$copyObj->setDbSoundcloudErrorCode($this->getDbSoundcloudErrorCode());
$copyObj->setDbSoundcloudErrorMsg($this->getDbSoundcloudErrorMsg());
$copyObj->setDbSoundcloudLinkToFile($this->getDbSoundcloudLinkToFile());
$copyObj->setDbSoundCloundUploadTime($this->getDbSoundCloundUploadTime());
$copyObj->setDbReplayGain($this->getDbReplayGain());
$copyObj->setDbOwnerId($this->getDbOwnerId());
$copyObj->setDbCuein($this->getDbCuein());
@ -7759,11 +7458,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->contributor = null;
$this->language = null;
$this->file_exists = null;
$this->soundcloud_id = null;
$this->soundcloud_error_code = null;
$this->soundcloud_error_msg = null;
$this->soundcloud_link_to_file = null;
$this->soundcloud_upload_time = null;
$this->replay_gain = null;
$this->owner_id = null;
$this->cuein = null;

View File

@ -24,13 +24,13 @@ abstract class BaseCcFilesPeer
const TM_CLASS = 'CcFilesTableMap';
/** The total number of columns. */
const NUM_COLUMNS = 72;
const NUM_COLUMNS = 69;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
const NUM_HYDRATE_COLUMNS = 72;
const NUM_HYDRATE_COLUMNS = 69;
/** the column name for the id field */
const ID = 'cc_files.id';
@ -203,21 +203,6 @@ abstract class BaseCcFilesPeer
/** the column name for the file_exists field */
const FILE_EXISTS = 'cc_files.file_exists';
/** the column name for the soundcloud_id field */
const SOUNDCLOUD_ID = 'cc_files.soundcloud_id';
/** the column name for the soundcloud_error_code field */
const SOUNDCLOUD_ERROR_CODE = 'cc_files.soundcloud_error_code';
/** the column name for the soundcloud_error_msg field */
const SOUNDCLOUD_ERROR_MSG = 'cc_files.soundcloud_error_msg';
/** the column name for the soundcloud_link_to_file field */
const SOUNDCLOUD_LINK_TO_FILE = 'cc_files.soundcloud_link_to_file';
/** the column name for the soundcloud_upload_time field */
const SOUNDCLOUD_UPLOAD_TIME = 'cc_files.soundcloud_upload_time';
/** the column name for the replay_gain field */
const REPLAY_GAIN = 'cc_files.replay_gain';
@ -273,12 +258,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', 'DbArtwork', 'DbTrackType', ),
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', 'dbTrackType', ),
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, CcFilesPeer::TRACK_TYPE, ),
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', 'TRACK_TYPE', ),
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', 'track_type', ),
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, 73, )
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', 'DbReplayGain', 'DbOwnerId', 'DbCuein', 'DbCueout', 'DbSilanCheck', 'DbHidden', 'DbIsScheduled', 'DbIsPlaylist', 'DbFilesize', 'DbDescription', 'DbArtwork', 'DbTrackType', ),
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', 'dbReplayGain', 'dbOwnerId', 'dbCuein', 'dbCueout', 'dbSilanCheck', 'dbHidden', 'dbIsScheduled', 'dbIsPlaylist', 'dbFilesize', 'dbDescription', 'dbArtwork', 'dbTrackType', ),
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::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, CcFilesPeer::TRACK_TYPE, ),
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', 'REPLAY_GAIN', 'OWNER_ID', 'CUEIN', 'CUEOUT', 'SILAN_CHECK', 'HIDDEN', 'IS_SCHEDULED', 'IS_PLAYLIST', 'FILESIZE', 'DESCRIPTION', 'ARTWORK', 'TRACK_TYPE', ),
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', 'replay_gain', 'owner_id', 'cuein', 'cueout', 'silan_check', 'hidden', 'is_scheduled', 'is_playlist', 'filesize', 'description', 'artwork', 'track_type', ),
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, )
);
/**
@ -288,12 +273,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, 'DbArtwork' => 72, 'DbTrackType' => 73, ),
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, 'dbTrackType' => 73, ),
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, 'TRACK_TYPE' => 73, ),
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, 'track_type' => 73, ),
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, 73, )
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, 'DbReplayGain' => 57, 'DbOwnerId' => 58, 'DbCuein' => 59, 'DbCueout' => 60, 'DbSilanCheck' => 61, 'DbHidden' => 62, 'DbIsScheduled' => 63, 'DbIsPlaylist' => 64, 'DbFilesize' => 65, 'DbDescription' => 66, 'DbArtwork' => 67, 'DbTrackType' => 68, ),
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, 'dbReplayGain' => 57, 'dbOwnerId' => 58, 'dbCuein' => 59, 'dbCueout' => 60, 'dbSilanCheck' => 61, 'dbHidden' => 62, 'dbIsScheduled' => 63, 'dbIsPlaylist' => 64, 'dbFilesize' => 65, 'dbDescription' => 66, 'dbArtwork' => 67, 'dbTrackType' => 68, ),
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::REPLAY_GAIN => 57, CcFilesPeer::OWNER_ID => 58, CcFilesPeer::CUEIN => 59, CcFilesPeer::CUEOUT => 60, CcFilesPeer::SILAN_CHECK => 61, CcFilesPeer::HIDDEN => 62, CcFilesPeer::IS_SCHEDULED => 63, CcFilesPeer::IS_PLAYLIST => 64, CcFilesPeer::FILESIZE => 65, CcFilesPeer::DESCRIPTION => 66, CcFilesPeer::ARTWORK => 67, CcFilesPeer::TRACK_TYPE => 68, ),
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, 'REPLAY_GAIN' => 57, 'OWNER_ID' => 58, 'CUEIN' => 59, 'CUEOUT' => 60, 'SILAN_CHECK' => 61, 'HIDDEN' => 62, 'IS_SCHEDULED' => 63, 'IS_PLAYLIST' => 64, 'FILESIZE' => 65, 'DESCRIPTION' => 66, 'ARTWORK' => 67, 'TRACK_TYPE' => 68, ),
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, 'replay_gain' => 57, 'owner_id' => 58, 'cuein' => 59, 'cueout' => 60, 'silan_check' => 61, 'hidden' => 62, 'is_scheduled' => 63, 'is_playlist' => 64, 'filesize' => 65, 'description' => 66, 'artwork' => 67, 'track_type' => 68, ),
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, )
);
/**
@ -424,11 +409,6 @@ abstract class BaseCcFilesPeer
$criteria->addSelectColumn(CcFilesPeer::CONTRIBUTOR);
$criteria->addSelectColumn(CcFilesPeer::LANGUAGE);
$criteria->addSelectColumn(CcFilesPeer::FILE_EXISTS);
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_ID);
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_ERROR_CODE);
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_ERROR_MSG);
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE);
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME);
$criteria->addSelectColumn(CcFilesPeer::REPLAY_GAIN);
$criteria->addSelectColumn(CcFilesPeer::OWNER_ID);
$criteria->addSelectColumn(CcFilesPeer::CUEIN);
@ -499,11 +479,6 @@ abstract class BaseCcFilesPeer
$criteria->addSelectColumn($alias . '.contributor');
$criteria->addSelectColumn($alias . '.language');
$criteria->addSelectColumn($alias . '.file_exists');
$criteria->addSelectColumn($alias . '.soundcloud_id');
$criteria->addSelectColumn($alias . '.soundcloud_error_code');
$criteria->addSelectColumn($alias . '.soundcloud_error_msg');
$criteria->addSelectColumn($alias . '.soundcloud_link_to_file');
$criteria->addSelectColumn($alias . '.soundcloud_upload_time');
$criteria->addSelectColumn($alias . '.replay_gain');
$criteria->addSelectColumn($alias . '.owner_id');
$criteria->addSelectColumn($alias . '.cuein');

View File

@ -63,11 +63,6 @@
* @method CcFilesQuery orderByDbContributor($order = Criteria::ASC) Order by the contributor column
* @method CcFilesQuery orderByDbLanguage($order = Criteria::ASC) Order by the language column
* @method CcFilesQuery orderByDbFileExists($order = Criteria::ASC) Order by the file_exists column
* @method CcFilesQuery orderByDbSoundcloudId($order = Criteria::ASC) Order by the soundcloud_id column
* @method CcFilesQuery orderByDbSoundcloudErrorCode($order = Criteria::ASC) Order by the soundcloud_error_code column
* @method CcFilesQuery orderByDbSoundcloudErrorMsg($order = Criteria::ASC) Order by the soundcloud_error_msg column
* @method CcFilesQuery orderByDbSoundcloudLinkToFile($order = Criteria::ASC) Order by the soundcloud_link_to_file column
* @method CcFilesQuery orderByDbSoundCloundUploadTime($order = Criteria::ASC) Order by the soundcloud_upload_time column
* @method CcFilesQuery orderByDbReplayGain($order = Criteria::ASC) Order by the replay_gain column
* @method CcFilesQuery orderByDbOwnerId($order = Criteria::ASC) Order by the owner_id column
* @method CcFilesQuery orderByDbCuein($order = Criteria::ASC) Order by the cuein column
@ -138,11 +133,6 @@
* @method CcFilesQuery groupByDbContributor() Group by the contributor column
* @method CcFilesQuery groupByDbLanguage() Group by the language column
* @method CcFilesQuery groupByDbFileExists() Group by the file_exists column
* @method CcFilesQuery groupByDbSoundcloudId() Group by the soundcloud_id column
* @method CcFilesQuery groupByDbSoundcloudErrorCode() Group by the soundcloud_error_code column
* @method CcFilesQuery groupByDbSoundcloudErrorMsg() Group by the soundcloud_error_msg column
* @method CcFilesQuery groupByDbSoundcloudLinkToFile() Group by the soundcloud_link_to_file column
* @method CcFilesQuery groupByDbSoundCloundUploadTime() Group by the soundcloud_upload_time column
* @method CcFilesQuery groupByDbReplayGain() Group by the replay_gain column
* @method CcFilesQuery groupByDbOwnerId() Group by the owner_id column
* @method CcFilesQuery groupByDbCuein() Group by the cuein column
@ -263,11 +253,6 @@
* @method CcFiles findOneByDbContributor(string $contributor) Return the first CcFiles filtered by the contributor column
* @method CcFiles findOneByDbLanguage(string $language) Return the first CcFiles filtered by the language column
* @method CcFiles findOneByDbFileExists(boolean $file_exists) Return the first CcFiles filtered by the file_exists column
* @method CcFiles findOneByDbSoundcloudId(int $soundcloud_id) Return the first CcFiles filtered by the soundcloud_id column
* @method CcFiles findOneByDbSoundcloudErrorCode(int $soundcloud_error_code) Return the first CcFiles filtered by the soundcloud_error_code column
* @method CcFiles findOneByDbSoundcloudErrorMsg(string $soundcloud_error_msg) Return the first CcFiles filtered by the soundcloud_error_msg column
* @method CcFiles findOneByDbSoundcloudLinkToFile(string $soundcloud_link_to_file) Return the first CcFiles filtered by the soundcloud_link_to_file column
* @method CcFiles findOneByDbSoundCloundUploadTime(string $soundcloud_upload_time) Return the first CcFiles filtered by the soundcloud_upload_time column
* @method CcFiles findOneByDbReplayGain(string $replay_gain) Return the first CcFiles filtered by the replay_gain column
* @method CcFiles findOneByDbOwnerId(int $owner_id) Return the first CcFiles filtered by the owner_id column
* @method CcFiles findOneByDbCuein(string $cuein) Return the first CcFiles filtered by the cuein column
@ -338,11 +323,6 @@
* @method array findByDbContributor(string $contributor) Return CcFiles objects filtered by the contributor column
* @method array findByDbLanguage(string $language) Return CcFiles objects filtered by the language column
* @method array findByDbFileExists(boolean $file_exists) Return CcFiles objects filtered by the file_exists column
* @method array findByDbSoundcloudId(int $soundcloud_id) Return CcFiles objects filtered by the soundcloud_id column
* @method array findByDbSoundcloudErrorCode(int $soundcloud_error_code) Return CcFiles objects filtered by the soundcloud_error_code column
* @method array findByDbSoundcloudErrorMsg(string $soundcloud_error_msg) Return CcFiles objects filtered by the soundcloud_error_msg column
* @method array findByDbSoundcloudLinkToFile(string $soundcloud_link_to_file) Return CcFiles objects filtered by the soundcloud_link_to_file column
* @method array findByDbSoundCloundUploadTime(string $soundcloud_upload_time) Return CcFiles objects filtered by the soundcloud_upload_time column
* @method array findByDbReplayGain(string $replay_gain) Return CcFiles objects filtered by the replay_gain column
* @method array findByDbOwnerId(int $owner_id) Return CcFiles objects filtered by the owner_id column
* @method array findByDbCuein(string $cuein) Return CcFiles objects filtered by the cuein column
@ -462,7 +442,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", "artwork", "track_type" 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", "replay_gain", "owner_id", "cuein", "cueout", "silan_check", "hidden", "is_scheduled", "is_playlist", "filesize", "description", "artwork", "track_type" FROM "cc_files" WHERE "id" = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@ -2436,191 +2416,6 @@ abstract class BaseCcFilesQuery extends ModelCriteria
return $this->addUsingAlias(CcFilesPeer::FILE_EXISTS, $dbFileExists, $comparison);
}
/**
* Filter the query on the soundcloud_id column
*
* Example usage:
* <code>
* $query->filterByDbSoundcloudId(1234); // WHERE soundcloud_id = 1234
* $query->filterByDbSoundcloudId(array(12, 34)); // WHERE soundcloud_id IN (12, 34)
* $query->filterByDbSoundcloudId(array('min' => 12)); // WHERE soundcloud_id >= 12
* $query->filterByDbSoundcloudId(array('max' => 12)); // WHERE soundcloud_id <= 12
* </code>
*
* @param mixed $dbSoundcloudId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcFilesQuery The current query, for fluid interface
*/
public function filterByDbSoundcloudId($dbSoundcloudId = null, $comparison = null)
{
if (is_array($dbSoundcloudId)) {
$useMinMax = false;
if (isset($dbSoundcloudId['min'])) {
$this->addUsingAlias(CcFilesPeer::SOUNDCLOUD_ID, $dbSoundcloudId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbSoundcloudId['max'])) {
$this->addUsingAlias(CcFilesPeer::SOUNDCLOUD_ID, $dbSoundcloudId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcFilesPeer::SOUNDCLOUD_ID, $dbSoundcloudId, $comparison);
}
/**
* Filter the query on the soundcloud_error_code column
*
* Example usage:
* <code>
* $query->filterByDbSoundcloudErrorCode(1234); // WHERE soundcloud_error_code = 1234
* $query->filterByDbSoundcloudErrorCode(array(12, 34)); // WHERE soundcloud_error_code IN (12, 34)
* $query->filterByDbSoundcloudErrorCode(array('min' => 12)); // WHERE soundcloud_error_code >= 12
* $query->filterByDbSoundcloudErrorCode(array('max' => 12)); // WHERE soundcloud_error_code <= 12
* </code>
*
* @param mixed $dbSoundcloudErrorCode The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcFilesQuery The current query, for fluid interface
*/
public function filterByDbSoundcloudErrorCode($dbSoundcloudErrorCode = null, $comparison = null)
{
if (is_array($dbSoundcloudErrorCode)) {
$useMinMax = false;
if (isset($dbSoundcloudErrorCode['min'])) {
$this->addUsingAlias(CcFilesPeer::SOUNDCLOUD_ERROR_CODE, $dbSoundcloudErrorCode['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbSoundcloudErrorCode['max'])) {
$this->addUsingAlias(CcFilesPeer::SOUNDCLOUD_ERROR_CODE, $dbSoundcloudErrorCode['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcFilesPeer::SOUNDCLOUD_ERROR_CODE, $dbSoundcloudErrorCode, $comparison);
}
/**
* Filter the query on the soundcloud_error_msg column
*
* Example usage:
* <code>
* $query->filterByDbSoundcloudErrorMsg('fooValue'); // WHERE soundcloud_error_msg = 'fooValue'
* $query->filterByDbSoundcloudErrorMsg('%fooValue%'); // WHERE soundcloud_error_msg LIKE '%fooValue%'
* </code>
*
* @param string $dbSoundcloudErrorMsg 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 filterByDbSoundcloudErrorMsg($dbSoundcloudErrorMsg = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbSoundcloudErrorMsg)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbSoundcloudErrorMsg)) {
$dbSoundcloudErrorMsg = str_replace('*', '%', $dbSoundcloudErrorMsg);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcFilesPeer::SOUNDCLOUD_ERROR_MSG, $dbSoundcloudErrorMsg, $comparison);
}
/**
* Filter the query on the soundcloud_link_to_file column
*
* Example usage:
* <code>
* $query->filterByDbSoundcloudLinkToFile('fooValue'); // WHERE soundcloud_link_to_file = 'fooValue'
* $query->filterByDbSoundcloudLinkToFile('%fooValue%'); // WHERE soundcloud_link_to_file LIKE '%fooValue%'
* </code>
*
* @param string $dbSoundcloudLinkToFile 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 filterByDbSoundcloudLinkToFile($dbSoundcloudLinkToFile = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbSoundcloudLinkToFile)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbSoundcloudLinkToFile)) {
$dbSoundcloudLinkToFile = str_replace('*', '%', $dbSoundcloudLinkToFile);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE, $dbSoundcloudLinkToFile, $comparison);
}
/**
* Filter the query on the soundcloud_upload_time column
*
* Example usage:
* <code>
* $query->filterByDbSoundCloundUploadTime('2011-03-14'); // WHERE soundcloud_upload_time = '2011-03-14'
* $query->filterByDbSoundCloundUploadTime('now'); // WHERE soundcloud_upload_time = '2011-03-14'
* $query->filterByDbSoundCloundUploadTime(array('max' => 'yesterday')); // WHERE soundcloud_upload_time < '2011-03-13'
* </code>
*
* @param mixed $dbSoundCloundUploadTime The value to use as filter.
* Values can be integers (unix timestamps), DateTime objects, or strings.
* Empty strings are treated as NULL.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcFilesQuery The current query, for fluid interface
*/
public function filterByDbSoundCloundUploadTime($dbSoundCloundUploadTime = null, $comparison = null)
{
if (is_array($dbSoundCloundUploadTime)) {
$useMinMax = false;
if (isset($dbSoundCloundUploadTime['min'])) {
$this->addUsingAlias(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME, $dbSoundCloundUploadTime['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbSoundCloundUploadTime['max'])) {
$this->addUsingAlias(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME, $dbSoundCloundUploadTime['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME, $dbSoundCloundUploadTime, $comparison);
}
/**
* Filter the query on the replay_gain column
*

View File

@ -11,8 +11,6 @@ class CeleryServiceFactory {
*/
public static function getService($serviceName) {
switch($serviceName) {
case SOUNDCLOUD_SERVICE_NAME:
return new Application_Service_SoundcloudService();
case PODCAST_SERVICE_NAME:
return new Application_Service_PodcastEpisodeService();
default:

View File

@ -33,10 +33,10 @@ class Application_Service_MediaService
}
//Copy the temporary file over to the "organize" folder so that it's off our webserver
//and accessible by airtime_analyzer which could be running on a different machine.
//and accessible by libretime-analyzer which could be running on a different machine.
$newTempFilePath = Application_Model_StoredFile::moveFileToStor($filePath, $originalFilename, $copyFile);
//Dispatch a message to airtime_analyzer through RabbitMQ,
//Dispatch a message to libretime-analyzer through RabbitMQ,
//notifying it that there's a new upload to process!
$storageBackend = new ProxyStorageBackend($CC_CONFIG["current_backend"]);
Application_Model_RabbitMq::SendMessageToAnalyzer($newTempFilePath,

View File

@ -6,13 +6,12 @@ class Application_Service_PublishService {
* @var array map of arbitrary source names to descriptive labels
*/
private static $SOURCES = array(
"soundcloud" => SOUNDCLOUD,
"station_podcast" => "My Podcast"
);
/**
* Publish or remove the file with the given file ID from the services
* specified in the request data (ie. SoundCloud, the station podcast)
* specified in the request data (ie. the station podcast)
*
* @param int $fileId ID of the file to be published
* @param array $data request data containing what services to publish to

View File

@ -11,8 +11,6 @@ class PublishServiceFactory {
*/
public static function getService($serviceName) {
switch($serviceName) {
case SOUNDCLOUD_SERVICE_NAME:
return new Application_Service_SoundcloudService();
case STATION_PODCAST_SERVICE_NAME:
return new Application_Service_PodcastEpisodeService();
default:

View File

@ -1,349 +0,0 @@
<?php
/**
* Service object for dealing with SoundCloud authorization and background tasks
*
* Class Application_Service_SoundcloudService
*/
class Application_Service_SoundcloudService extends Application_Service_ThirdPartyCeleryService implements OAuth2, Publish {
/**
* Arbitrary constant identifiers for the internal tasks array
*/
const UPLOAD = 'upload';
const UPDATE = 'update';
const DOWNLOAD = 'download';
const DELETE = 'delete';
/**
* @var string service access token for accessing remote API
*/
protected $_accessToken;
/**
* @var Soundcloud\Service SoundCloud API wrapper object
*/
private $_client;
/**
* @var string service name to store in ThirdPartyTrackReferences database
*/
protected static $_SERVICE_NAME = SOUNDCLOUD_SERVICE_NAME; // SoundCloud service name constant from constants.php
/**
* @var string exchange name for SoundCloud tasks
*/
protected static $_CELERY_EXCHANGE_NAME = 'soundcloud';
/**
* @var array map of constant identifiers to Celery task names
*/
protected static $_CELERY_TASKS = [
self::UPLOAD => 'soundcloud-upload',
self::UPDATE => 'soundcloud-update',
self::DOWNLOAD => 'soundcloud-download',
self::DELETE => 'soundcloud-delete'
];
/**
* @var array Application_Model_Preference functions for SoundCloud and their
* associated API parameter keys so that we can call them dynamically
*/
private static $_SOUNDCLOUD_PREF_FUNCTIONS = array(
"getDefaultSoundCloudLicenseType" => "license",
"getDefaultSoundCloudSharingType" => "sharing"
);
/**
* Initialize the service
*/
public function __construct() {
$CC_CONFIG = Config::getConfig();
$clientId = $CC_CONFIG['soundcloud-client-id'];
$clientSecret = $CC_CONFIG['soundcloud-client-secret'];
$redirectUri = $CC_CONFIG['soundcloud-redirect-uri'];
if ($clientId && $clientSecret && $redirectUri) {
$this->_client = new Soundcloud\Service($clientId, $clientSecret, $redirectUri);
$accessToken = Application_Model_Preference::getSoundCloudRequestToken();
}
if (!empty($accessToken)) {
$this->_accessToken = $accessToken;
$this->_client->setAccessToken($accessToken);
}
}
/**
* Build a parameter array for the track being uploaded to SoundCloud
*
* @param $file Application_Model_StoredFile the file being uploaded
*
* @return array the track array to send to SoundCloud
*/
protected function _getUploadData($file) {
$file = $file->getPropelOrm();
$trackArray = $this->_serializeTrack($file);
foreach (self::$_SOUNDCLOUD_PREF_FUNCTIONS as $func => $param) {
$val = Application_Model_Preference::$func();
if (!empty($val)) {
$trackArray[$param] = $val;
}
}
return $trackArray;
}
/**
* Serialize Airtime file data to send to SoundCloud
*
* Ignores any null fields, as these will cause the upload to throw a 422
* Unprocessable Entity error
*
* TODO: Move this into a proper serializer
*
* @param $file CcFiles file object
*
* @return array the serialized data
*/
protected function _serializeTrack($file) {
$fileData = array(
'title' => $file->getDbTrackTitle(),
'genre' => $file->getDbGenre(),
'bpm' => $file->getDbBpm(),
'release_year' => $file->getDbYear(),
);
$trackArray = array();
foreach ($fileData as $k => $v) {
if (!empty($v)) {
$trackArray[$k] = $v;
}
}
return $trackArray;
}
/**
* Upload the file with the given identifier to SoundCloud
*
* @param int $fileId the local CcFiles identifier
*/
public function upload($fileId) {
$file = Application_Model_StoredFile::RecallById($fileId);
$data = array(
'data' => $this->_getUploadData($file),
'token' => $this->_accessToken,
'file_path' => $file->getFilePaths()[0]
);
$this->_executeTask(static::$_CELERY_TASKS[self::UPLOAD], $data, $fileId);
}
/**
* Given a track identifier, update a track on SoundCloud
*
* @param int $trackId a track identifier
*/
public function update($trackId) {
$trackRef = ThirdPartyTrackReferencesQuery::create()
->findOneByDbForeignId($trackId);
$file = Application_Model_StoredFile::RecallById($trackRef->getDbFileId());
$data = array(
'data' => $this->_getUploadData($file),
'token' => $this->_accessToken,
'track_id' => $trackId
);
$this->_executeTask(static::$_CELERY_TASKS[self::UPDATE], $data, $trackRef->getDbFileId());
}
/**
* Given a track identifier, download a track from SoundCloud
*
* @param int $trackId a track identifier
*/
public function download($trackId) {
$CC_CONFIG = Config::getConfig();
$data = array(
'callback_url' => Application_Common_HTTPHelper::getStationUrl() . 'rest/media',
'api_key' => $apiKey = $CC_CONFIG["apiKey"][0],
'token' => $this->_accessToken,
'track_id' => $trackId
);
$this->_executeTask(static::$_CELERY_TASKS[self::DOWNLOAD], $data);
}
/**
* Delete the file with the given identifier from SoundCloud
*
* @param int $fileId the local CcFiles identifier
*
* @throws ServiceNotFoundException when a $fileId with no corresponding
* service identifier is given
*/
public function delete($fileId) {
$serviceId = $this->getServiceId($fileId);
if ($serviceId == 0) {
throw new ServiceNotFoundException("No service ID found for file with ID $fileId");
}
$data = array(
'token' => $this->_accessToken,
'track_id' => $serviceId
);
$this->_executeTask(static::$_CELERY_TASKS[self::DELETE], $data, $fileId);
}
/**
* Update a ThirdPartyTrackReferences object for a completed upload
*
* TODO: should we have a database layer class to handle Propel operations?
*
* @param $task CeleryTasks the completed CeleryTasks object
* @param $trackId int ThirdPartyTrackReferences identifier
* @param $track object third-party service track object
* @param $status string Celery task status
*
* @return ThirdPartyTrackReferences the updated ThirdPartyTrackReferences object
* or null if the task was a DELETE
*
* @throws Exception
* @throws PropelException
*/
public function updateTrackReference($task, $trackId, $track, $status) {
$ref = parent::updateTrackReference($task, $trackId, $track, $status);
// TODO: fetch any additional SoundCloud parameters we want to store
// Only set the SoundCloud fields if the task was successful
if ($status == CELERY_SUCCESS_STATUS) {
// If the task was to delete the file from SoundCloud, remove the reference
if ($task->getDbName() == static::$_CELERY_TASKS[self::DELETE]) {
$this->removeTrackReference($ref->getDbFileId());
return null;
}
$ref->setDbForeignId($track->id); // SoundCloud identifier
if (isset($track->fileid)) {
$ref->setDbFileId($track->fileid); // For downloads, set the cc_files ID
}
}
// TODO: set SoundCloud upload status?
// $ref->setDbStatus($status);
$ref->save();
return $ref;
}
/**
* Given a CcFiles identifier for a file that's been uploaded to SoundCloud,
* return a link to the remote file
*
* @param int $fileId the local CcFiles identifier
*
* @return string the link to the remote file
*
* @throws Soundcloud\Exception\InvalidHttpResponseCodeException when SoundCloud returns a 4xx/5xx response
*/
public function getLinkToFile($fileId) {
$serviceId = $this->getServiceId($fileId);
// If we don't find a record for the file we'll get 0 back for the id
if ($serviceId == 0) { return ''; }
try {
$track = json_decode($this->_client->get('tracks/' . $serviceId));
} catch (Soundcloud\Exception\InvalidHttpResponseCodeException $e) {
// If we end up here it means the track was removed from SoundCloud
// or the foreign id in our database is incorrect, so we should just
// get rid of the database record
Logging::warn("Error retrieving track data from SoundCloud: " . $e->getMessage());
$this->removeTrackReference($fileId);
throw $e; // Throw the exception up to the controller so we can redirect to a 404
}
return $track->permalink_url;
}
/**
* Check whether an access token exists for the SoundCloud client
*
* @return bool true if an access token exists, otherwise false
*/
public function hasAccessToken() {
return !empty($this->_accessToken);
}
/**
* Get the SoundCloud authorization URL
*
* @return string the authorization URL
*/
public function getAuthorizeUrl() {
// Pass the current URL in the state parameter in order to preserve it
// in the redirect. This allows us to create a singular script to redirect
// back to any station the request comes from.
$url = urlencode(Application_Common_HTTPHelper::getStationUrl() . '/soundcloud/redirect');
return $this->_client->getAuthorizeUrl(array("state" => $url, "scope" => "non-expiring"));
}
/**
* Request a new access token from SoundCloud and store it in CcPref
*
* @param $code string exchange authorization code for access token
*/
public function requestNewAccessToken($code) {
// Get a non-expiring access token
$response = $this->_client->accessToken($code);
$accessToken = $response['access_token'];
Application_Model_Preference::setSoundCloudRequestToken($accessToken);
$this->_accessToken = $accessToken;
}
/**
* Regenerate the SoundCloud client's access token
*
* @throws Soundcloud\Exception\InvalidHttpResponseCodeException
* thrown when attempting to regenerate a stale token
*/
public function accessTokenRefresh() {
assert($this->hasAccessToken());
try {
$accessToken = $this->_accessToken;
$this->_client->accessTokenRefresh($accessToken);
} catch(Soundcloud\Exception\InvalidHttpResponseCodeException $e) {
// If we get here, then that means our token is stale, so remove it
// Because we're using non-expiring tokens, we shouldn't get here (!)
Application_Model_Preference::setSoundCloudRequestToken("");
}
}
/**
* Publishing interface proxy
*
* Publish the file with the given file ID to SoundCloud
*
* @param int $fileId ID of the file to be published
*/
public function publish($fileId) {
$this->upload($fileId);
}
/**
* Publishing interface proxy
*
* Unpublish the file with the given file ID from SoundCloud
*
* @param int $fileId ID of the file to be unpublished
*
* @throws ServiceNotFoundException when a $fileId with no corresponding
* service identifier is given
*/
public function unpublish($fileId) {
$this->delete($fileId);
}
/**
* Fetch the publication status for the file with the given ID
*
* @param int $fileId the ID of the file to check
*
* @return int 1 if the file has been published,
* 0 if the file has yet to be published,
* -1 if the file is in a pending state,
* 2 if the source is unreachable (disconnected)
*/
public function getPublishStatus($fileId) {
if (!$this->hasAccessToken()) { return 2; }
return ($this->referenceExists($fileId));
}
}

View File

@ -638,3 +638,16 @@ class AirtimeUpgrader200alpha9_3 extends AirtimeUpgrader
return '3.0.0-alpha.9.3';
}
}
class AirtimeUpgrader200alpha9_4 extends AirtimeUpgrader
{
protected function getSupportedSchemaVersions() {
return array(
'3.0.0-alpha.9.3'
);
}
public function getNewVersion() {
return '3.0.0-alpha.9.4';
}
}

View File

@ -1,26 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="<?php echo $this->css?>" type="text/css">
<script src="<?php echo $this->jquery ?>" type="text/javascript"></script>
<script src="<?php echo $this->jquery_custom ?>" type="text/javascript"></script>
<script src="<?php echo $this->widget_js ?>" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#onAirToday").airtimeShowSchedule({
sourceDomain: "http://localhost",
text: {onAirToday:"On air today"},
updatePeriod: 5, //seconds
showLimit: 10
});
});
</script>
</head>
<body>
<div id="onAirToday"></div>
</body>
</html>

View File

@ -2,103 +2,103 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="<?php echo $this->angular ?>" type="text/javascript"></script>
<link rel="stylesheet" href="<?php echo $this->css?>" type="text/css">
<script src="<?php echo $this->jquery ?>" type="text/javascript"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,300,700' rel='stylesheet' type='text/css'>
<script type="text/javascript">
$(document).ready(function() {
//initialize first day to active
$('.tabs').find("li").first().addClass("active");
$('.schedule_content').find('.schedule_item').first().addClass("active");
$('.tabs li').click(function(){
//var tab_id = $(this).attr('data-tab');
var tab_id = "day-"+$(this).find('span').text();
$('.tabs li').removeClass('active');
$('.schedule_item').removeClass('active');
$(this).addClass('active');
$("#"+tab_id).addClass('active');
});
});
String.prototype.paddingLeft = function(paddingValue) {
return String(paddingValue + this).slice(-paddingValue.length);
};
var schedule_data = <?php echo $this->schedule_data; ?>;
var app = angular.module('scheduleWidget', []);
app.controller('scheduleController', ['$scope', '$window', function($scope, $window) {
// Loop through every show and assign it to the corresponding day of the week's
// show array.
angular.forEach($window.schedule_data["shows"], function(value, key) {
// First we have to create a Date object out of the show time in UTC.
// Then we can format the string in the client's local timezone.
// NOTE: we have to multiply the timestamp by 1000 because in PHP
// the timestamps are in seconds and are in milliseconds in javascript.
var start_date = new Date(value.starts_timestamp*1000);
var end_date = new Date(value.ends_timestamp*1000);
// This variable is used to identify which schedule_data object (which day of the week)
// we should assign the show to.
// NOTE: we have to add 1 to the month because javascript's Date.getMonth()
// function returns the month number starting with an index of 0. In PHP,
// the months are indexed starting at 1.
var format_start_date = start_date.getFullYear() + "-" + (start_date.getMonth()+1) + "-" + start_date.getDate();
if ($window.schedule_data["weekDays"][format_start_date] !== undefined) {
$window.schedule_data["weekDays"][format_start_date]["shows"].push(
{
"show_start_hour": start_date.toLocaleTimeString([], { hour: 'numeric', minute : 'numeric' }),
"show_end_hour": end_date.toLocaleTimeString([], { hour: 'numeric', minute : 'numeric' }),
"name": value.name
});
}
});
// Convert the object into an array to maintain the same order when we
// iterate over each weekday
$scope.weekDays = $.map($window.schedule_data["weekDays"], function(value, index) {
return [value];
});
$scope.isEmpty = function(obj) {
return obj.length == 0;
};
}]);
</script>
<script src="/js/libs/handlebars.min.js"></script>
</head>
<body ng-app="scheduleWidget" ng-controller="scheduleController">
<div class="schedule tab_content current">
<ul class="tabs">
<li ng-repeat="x in weekDays track by $index">
{{x.dayOfWeek}}<span>{{x.dayOfMonth}}</span>
</li>
</ul>
<body>
<div id="wpBody" class="schedule tab_content current">
<script id="wpWidget" type="text/x-handlebars-template">
<ul class="tabs">
{{#each this}}
<li>
{{dayOfWeek}}<span>{{dayOfMonth}}</span>
</li>
{{/each}}
</ul>
<div class="schedule_content">
<div ng-repeat="x in weekDays track by $index" ng-attr-id="{{'day-' + x.dayOfMonth}}" class="schedule_item">
<div ng-if="isEmpty(x.shows)" class="row empty-schedule"><?php echo _('Looks like there are no shows scheduled on this day.') ?></div>
<div ng-repeat="show in x.shows" class="row">
<div class="time_grid">{{show.show_start_hour}} - {{show.show_end_hour}}</div>
<div class="name_grid">{{show.name}}</div>
<div class="schedule_content">
{{#each this}}
<div id="day-{{dayOfMonth}}" class="schedule_item">
{{#if (noShowsCheck this.shows)}}
<div class="row empty-schedule"><?php echo _('Looks like there are no shows scheduled on this day.') ?></div>
{{else}}
{{#each shows}}
<div class="row">
<div class="time_grid">{{show_start_hour}} - {{show_end_hour}}</div>
<div class="name_grid">{{{name}}}</div>
</div>
{{/each}}
{{/if}}
</div>
{{/each}}
</div>
</div>
<div class="weekly-schedule-widget-footer" <?php if ($this->widgetStyle == "premium") echo "style='display:none'"; ?>>
<a href="<?php echo PRODUCT_SITE_URL; ?>" target="_blank"><?php printf(_('Powered by %s'), PRODUCT_NAME); ?></a>
</div>
<div class="weekly-schedule-widget-footer" <?php if ($this->widgetStyle == "premium") echo "style='display:none'"; ?>>
<a href="<?php echo PRODUCT_SITE_URL; ?>" target="_blank"><?php printf(_('Powered by %s'), PRODUCT_NAME); ?></a>
</div>
</script>
</div>
<script type="text/javascript">
let importSchedule = <?php echo $this->schedule_data; ?>; // Object prepared in JSON, w/o API call
let cleanSchedule = [];
// Insert shows into correct locations in importShows array (work-around for API v.1)
let importShows = importSchedule["shows"];
importShows.forEach(element => {
// Convert timestamps to JS (sec -> millisec)
var start_date = new Date(element.starts_timestamp*1000);
var end_date = new Date(element.ends_timestamp*1000);
// Check date of show so we know where to assign it to
var format_start_date = start_date.getFullYear() + "-" + (start_date.getMonth()+1) + "-" + start_date.getDate();
// Assign show to correct location
if (importSchedule["weekDays"][format_start_date] !== undefined) {
importSchedule["weekDays"][format_start_date]["shows"].push(
{
"show_start_hour": start_date.toLocaleTimeString([], { hour: 'numeric', minute : 'numeric' }),
"show_end_hour": end_date.toLocaleTimeString([], { hour: 'numeric', minute : 'numeric' }),
"name": element.name
});
}
});
// Re-arraying data into a Handlebars-friendly format
for (var i = 0; i <= 6; i++) {
cleanSchedule.push(Object.values(importSchedule.weekDays)[i]);
}
// Checker
Handlebars.registerHelper('noShowsCheck', function(obj){
return obj.length == 0;
});
// Templating with Handlebars.js
var wpWidget = document.querySelector('#wpWidget').innerHTML;
var wpTemplate = Handlebars.compile(wpWidget);
var compiledHTML = wpTemplate(cleanSchedule);
document.querySelector('#wpBody').innerHTML = compiledHTML;
// Tabs logic
$(document).ready(function() {
//initialize first day to active
$('.tabs').find("li").first().addClass("active");
$('.schedule_content').find('.schedule_item').first().addClass("active");
$('.tabs li').click(function(){
//var tab_id = $(this).attr('data-tab');
var tab_id = "day-"+$(this).find('span').text();
$('.tabs li').removeClass('active');
$('.schedule_item').removeClass('active');
$(this).addClass('active');
$("#"+tab_id).addClass('active');
});
});
</script>
</body>
</html>

View File

@ -41,6 +41,8 @@
<?php echo $this->element->getElement('podcastAutoSmartblock')->render() ?>
<?php echo $this->element->getElement('featurePreviewMode')->render() ?>
<?php echo $this->element->getElement('thirdPartyApi')->render() ?>
<?php echo $this->element->getElement('allowedCorsUrls')->render() ?>

View File

@ -1,16 +0,0 @@
<fieldset class="padded">
<dl class="zend_form">
<?php
$soundcloudService = new Application_Service_SoundcloudService();
if ($soundcloudService->hasAccessToken()) {
echo $this->element->getElement('SoundCloudDisconnect')->render();
} else {
echo $this->element->getElement('SoundCloudConnect')->render();
}
?>
<?php echo $this->element->getElement('SoundCloudLicense')->render() ?>
<?php echo $this->element->getElement('SoundCloudSharing')->render() ?>
</dl>
</fieldset>

View File

@ -15,17 +15,4 @@
</fieldset>
</div>
<div style="clear: both;"></div>
<?php $bandwidthLimit = Application_Model_Preference::getBandwidthLimit(); ?>
<?php if ($bandwidthLimit): ?>
<?php $bandwidthUsage = Application_Model_Preference::getBandwidthLimitCounter(); ?>
<?php $percentInUse = sprintf("%01.1f%% ", $bandwidthUsage/$bandwidthLimit*100); ?>
<div id="bandwidth_usage">
<div style="padding-bottom: 2px;"><?php echo _("Monthly Listener Bandwidth Usage") ?></div>
<div class="bandwidth_usage_progress_bar"></div>
<div class="bandwidth_usage_percent_in_use"><?php echo $percentInUse . _("in use") ?></div>
<div class="bandwidth_usage_used" style="width:<?php echo sprintf("%01.1f%%", min(100, $bandwidthUsage/$bandwidthLimit*100)) ?>;"></div>
<div style="margin-top: 17px; font-size: 12px;"><?php echo sprintf("%01.1fGB of %01.1fGB", $bandwidthUsage/pow(2, 30), $bandwidthLimit/pow(2, 30)); ?></div>
</div>
<?php endif; ?>
</div>

View File

@ -113,7 +113,7 @@ function checkRMQConnection() {
* @return boolean true if airtime-analyzer is running
*/
function checkAnalyzerService() {
exec("pgrep -f airtime_analyzer", $out, $status);
exec("pgrep -f libretime-analyzer", $out, $status);
if (($out > 0) && $status == 0) {
return posix_kill(rtrim($out[0]), 0);
}

View File

@ -253,23 +253,6 @@ base_recorded_files = '/var/tmp/airtime/show-recorder/'
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# S O U N D C L O U D
# ----------------------------------------------------------------------
#
# connection_retries: The number of times to retry the connection to
# Soundcloud.
# The default is 3.
#
# time_between_retries: The time between connection retries, in seconds.
# The default is 60.
#
[soundcloud]
connection_retries = 3
time_between_retries = 60
soundcloud_client_id = 0
soundcloud_client_secret = 0
soundcloud_redirect_uri = http://libretime.example.org/soundcloud_callback.php
#
# ----------------------------------------------------------------------
# F A C E B O O K

View File

@ -69,11 +69,6 @@
<column name="contributor" phpName="DbContributor" type="VARCHAR" size="512" required="false"/>
<column name="language" phpName="DbLanguage" type="VARCHAR" size="512" required="false"/>
<column name="file_exists" phpName="DbFileExists" type="BOOLEAN" required="false" defaultValue="true"/>
<column name="soundcloud_id" phpName="DbSoundcloudId" type="Integer" required="false"/>
<column name="soundcloud_error_code" phpName="DbSoundcloudErrorCode" type="Integer" required="false"/>
<column name="soundcloud_error_msg" phpName="DbSoundcloudErrorMsg" type="VARCHAR" size="512" required="false"/>
<column name="soundcloud_link_to_file" phpName="DbSoundcloudLinkToFile" type="VARCHAR" size="4096" required="false"/>
<column name="soundcloud_upload_time" phpName="DbSoundCloundUploadTime" type="TIMESTAMP" size="6" required="false"/>
<column name="replay_gain" phpName="DbReplayGain" type="NUMERIC" required="false"/>
<column name="owner_id" phpName="DbOwnerId" type="INTEGER" required="false"/>
<column name="cuein" phpName="DbCuein" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00"/>

View File

@ -81,11 +81,6 @@ CREATE TABLE "cc_files"
"contributor" VARCHAR(512),
"language" VARCHAR(512),
"file_exists" BOOLEAN DEFAULT 't',
"soundcloud_id" INTEGER,
"soundcloud_error_code" INTEGER,
"soundcloud_error_msg" VARCHAR(512),
"soundcloud_link_to_file" VARCHAR(4096),
"soundcloud_upload_time" TIMESTAMP(6),
"replay_gain" NUMERIC,
"owner_id" INTEGER,
"cuein" interval DEFAULT '00:00:00',
@ -115,9 +110,9 @@ CREATE TABLE "cc_track_types"
(
"id" serial NOT NULL,
"code" VARCHAR(16) DEFAULT '' NOT NULL,
"visibility" BOOLEAN DEFAULT 't' NOT NULL,
"type_name" VARCHAR(64) DEFAULT '' NOT NULL,
"description" VARCHAR(255) DEFAULT '' NOT NULL,
"visibility" boolean DEFAULT true NOT NULL,
PRIMARY KEY ("id"),
CONSTRAINT "cc_track_types_id_idx" UNIQUE ("id"),
CONSTRAINT "cc_track_types_code_idx" UNIQUE ("code")

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,265 +0,0 @@
/*
* File: TableTools.css
* Description: Styles for TableTools 2
* Author: Allan Jardine (www.sprymedia.co.uk)
* Language: Javascript
* License: LGPL / 3 point BSD
* Project: DataTables
*
* Copyright 2010 Allan Jardine, all rights reserved.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* CSS name space:
* DTTT DataTables TableTools
*
* Colour dictionary:
* Button border #d0d0d0
* Button border hover #999999
* Hover background #f0f0f0
* Action blue #4b66d9
*
* Style sheet provides:
* CONTAINER TableTools container element and styles applying to all components
* BUTTON_STYLES Action specific button styles
* SELECTING Row selection styles
* COLLECTIONS Drop down list (collection) styles
* PRINTING Print display styles
* MISC Minor misc styles
*/
/*
* CONTAINER
* TableTools container element and styles applying to all components
*/
div.DTTT_container {
position: relative;
float: left;
margin-bottom: 1em;
}
button.DTTT_button {
position: relative;
float: left;
height: 30px;
margin-right: 3px;
padding: 3px 5px;
border: 1px solid #d0d0d0;
background-color: #fff;
cursor: pointer;
*cursor: hand;
}
button.DTTT_button::-moz-focus-inner {
border: none !important;
padding: 0;
}
/*
* BUTTON_STYLES
* Action specific button styles
*/
button.DTTT_button_csv {
padding-right: 30px;
background: url(../images/csv.png) no-repeat center right;
}
button.DTTT_button_csv_hover {
padding-right: 30px;
border: 1px solid #999;
background: #f0f0f0 url(../images/csv_hover.png) no-repeat center right;
}
button.DTTT_button_xls {
padding-right: 30px;
background: url(../images/xls.png) no-repeat center right;
}
button.DTTT_button_xls_hover {
padding-right: 30px;
border: 1px solid #999;
background: #f0f0f0 url(../images/xls_hover.png) no-repeat center right;
}
button.DTTT_button_copy {
padding-right: 30px;
background: url(../images/copy.png) no-repeat center right;
}
button.DTTT_button_copy_hover {
padding-right: 30px;
border: 1px solid #999;
background: #f0f0f0 url(../images/copy_hover.png) no-repeat center right;
}
button.DTTT_button_pdf {
padding-right: 30px;
background: url(../images/pdf.png) no-repeat center right;
}
button.DTTT_button_pdf_hover {
padding-right: 30px;
border: 1px solid #999;
background: #f0f0f0 url(../images/pdf_hover.png) no-repeat center right;
}
button.DTTT_button_print {
padding-right: 30px;
background: url(../images/print.png) no-repeat center right;
}
button.DTTT_button_print_hover {
padding-right: 30px;
border: 1px solid #999;
background: #f0f0f0 url(../images/print_hover.png) no-repeat center right;
}
button.DTTT_button_text {
}
button.DTTT_button_text_hover {
border: 1px solid #999;
background-color: #f0f0f0;
}
button.DTTT_button_collection {
padding-right: 17px;
background: url(../images/collection.png) no-repeat center right;
}
button.DTTT_button_collection_hover {
padding-right: 17px;
border: 1px solid #999;
background: #f0f0f0 url(../images/collection_hover.png) no-repeat center right;
}
/*
* SELECTING
* Row selection styles
*/
table.DTTT_selectable tbody tr {
cursor: pointer;
*cursor: hand;
}
tr.DTTT_selected.odd {
background-color: #9FAFD1;
}
tr.DTTT_selected.odd td.sorting_1 {
background-color: #9FAFD1;
}
tr.DTTT_selected.odd td.sorting_2 {
background-color: #9FAFD1;
}
tr.DTTT_selected.odd td.sorting_3 {
background-color: #9FAFD1;
}
tr.DTTT_selected.even {
background-color: #B0BED9;
}
tr.DTTT_selected.even td.sorting_1 {
background-color: #B0BED9;
}
tr.DTTT_selected.even td.sorting_2 {
background-color: #B0BED9;
}
tr.DTTT_selected.even td.sorting_3 {
background-color: #B0BED9;
}
/*
* COLLECTIONS
* Drop down list (collection) styles
*/
div.DTTT_collection {
width: 150px;
padding: 3px;
border: 1px solid #ccc;
background-color: #f3f3f3;
overflow: hidden;
z-index: 2002;
}
div.DTTT_collection_background {
background: transparent url(../images/background.png) repeat top left;
z-index: 2001;
}
div.DTTT_collection button.DTTT_button {
float: none;
width: 100%;
margin-bottom: 2px;
background-color: white;
}
/*
* PRINTING
* Print display styles
*/
.DTTT_print_info {
position: absolute;
top: 50%;
left: 50%;
width: 400px;
height: 150px;
margin-left: -200px;
margin-top: -75px;
text-align: center;
background-color: #3f3f3f;
color: white;
padding: 10px 30px;
opacity: 0.9;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
}
.DTTT_print_info h6 {
font-weight: normal;
font-size: 28px;
line-height: 28px;
margin: 1em;
}
.DTTT_print_info p {
font-size: 14px;
line-height: 20px;
}
/*
* MISC
* Minor misc styles
*/
.DTTT_disabled {
color: #999;
}

View File

@ -1,183 +0,0 @@
/*
* File: TableTools.css
* Description: Styles for TableTools 2 with JUI theming
* Author: Allan Jardine (www.sprymedia.co.uk)
* Language: Javascript
* License: LGPL / 3 point BSD
* Project: DataTables
*
* Copyright 2010 Allan Jardine, all rights reserved.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Notes:
* Generally speaking, please refer to the TableTools.css file - this file contains basic
* modifications to that 'master' stylesheet for ThemeRoller.
*
* CSS name space:
* DTTT DataTables TableTools
*
* Colour dictionary:
* Button border #d0d0d0
* Button border hover #999999
* Hover background #f0f0f0
* Action blue #4b66d9
*
* Style sheet provides:
* CONTAINER TableTools container element and styles applying to all components
* SELECTING Row selection styles
* COLLECTIONS Drop down list (collection) styles
* PRINTING Print display styles
* MISC Minor misc styles
*/
/*
* CONTAINER
* TableTools container element and styles applying to all components
*/
div.DTTT_container {
position: relative;
float: left;
}
button.DTTT_button {
position: relative;
float: left;
height: 24px;
margin-right: 3px;
padding: 3px 10px;
border: 1px solid #d0d0d0;
background-color: #fff;
cursor: pointer;
*cursor: hand;
}
button.DTTT_button::-moz-focus-inner {
border: none !important;
padding: 0;
}
/*
* SELECTING
* Row selection styles
*/
table.DTTT_selectable tbody tr {
cursor: pointer;
*cursor: hand;
}
tr.DTTT_selected.odd {
background-color: #9FAFD1;
}
tr.DTTT_selected.odd td.sorting_1 {
background-color: #9FAFD1;
}
tr.DTTT_selected.odd td.sorting_2 {
background-color: #9FAFD1;
}
tr.DTTT_selected.odd td.sorting_3 {
background-color: #9FAFD1;
}
tr.DTTT_selected.even {
background-color: #B0BED9;
}
tr.DTTT_selected.even td.sorting_1 {
background-color: #B0BED9;
}
tr.DTTT_selected.even td.sorting_2 {
background-color: #B0BED9;
}
tr.DTTT_selected.even td.sorting_3 {
background-color: #B0BED9;
}
/*
* COLLECTIONS
* Drop down list (collection) styles
*/
div.DTTT_collection {
width: 150px;
background-color: #f3f3f3;
overflow: hidden;
z-index: 2002;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
}
div.DTTT_collection_background {
background: url(../images/background.png) repeat top left;
z-index: 2001;
}
div.DTTT_collection button.DTTT_button {
float: none;
width: 100%;
margin-bottom: -0.1em;
}
/*
* PRINTING
* Print display styles
*/
.DTTT_print_info {
position: absolute;
top: 50%;
left: 50%;
width: 400px;
height: 150px;
margin-left: -200px;
margin-top: -75px;
text-align: center;
background-color: #3f3f3f;
color: white;
padding: 10px 30px;
opacity: 0.9;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
}
.DTTT_print_info h6 {
font-weight: normal;
font-size: 28px;
line-height: 28px;
margin: 1em;
}
.DTTT_print_info p {
font-size: 14px;
line-height: 20px;
}
/*
* MISC
* Minor misc styles
*/
.DTTT_disabled {
color: #999;
}

View File

@ -1,265 +0,0 @@
/*
* File: TableTools.css
* Description: Styles for TableTools 2
* Author: Allan Jardine (www.sprymedia.co.uk)
* Language: Javascript
* License: LGPL / 3 point BSD
* Project: DataTables
*
* Copyright 2010 Allan Jardine, all rights reserved.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* CSS name space:
* DTTT DataTables TableTools
*
* Colour dictionary:
* Button border #d0d0d0
* Button border hover #999999
* Hover background #f0f0f0
* Action blue #4b66d9
*
* Style sheet provides:
* CONTAINER TableTools container element and styles applying to all components
* BUTTON_STYLES Action specific button styles
* SELECTING Row selection styles
* COLLECTIONS Drop down list (collection) styles
* PRINTING Print display styles
* MISC Minor misc styles
*/
/*
* CONTAINER
* TableTools container element and styles applying to all components
*/
div.DTTT_container {
position: relative;
float: right;
margin-bottom: 1em;
}
button.DTTT_button {
position: relative;
float: left;
height: 30px;
margin-right: 3px;
padding: 3px 5px;
border: 1px solid #d0d0d0;
background-color: #fff;
cursor: pointer;
*cursor: hand;
}
button.DTTT_button::-moz-focus-inner {
border: none !important;
padding: 0;
}
/*
* BUTTON_STYLES
* Action specific button styles
*/
button.DTTT_button_csv {
padding-right: 30px;
background: url(../images/csv.png) no-repeat center right;
}
button.DTTT_button_csv_hover {
padding-right: 30px;
border: 1px solid #999;
background: #f0f0f0 url(../images/csv_hover.png) no-repeat center right;
}
button.DTTT_button_xls {
padding-right: 30px;
background: url(../images/xls.png) no-repeat center right;
}
button.DTTT_button_xls_hover {
padding-right: 30px;
border: 1px solid #999;
background: #f0f0f0 url(../images/xls_hover.png) no-repeat center right;
}
button.DTTT_button_copy {
padding-right: 30px;
background: url(../images/copy.png) no-repeat center right;
}
button.DTTT_button_copy_hover {
padding-right: 30px;
border: 1px solid #999;
background: #f0f0f0 url(../images/copy_hover.png) no-repeat center right;
}
button.DTTT_button_pdf {
padding-right: 30px;
background: url(../images/pdf.png) no-repeat center right;
}
button.DTTT_button_pdf_hover {
padding-right: 30px;
border: 1px solid #999;
background: #f0f0f0 url(../images/pdf_hover.png) no-repeat center right;
}
button.DTTT_button_print {
padding-right: 30px;
background: url(../images/print.png) no-repeat center right;
}
button.DTTT_button_print_hover {
padding-right: 30px;
border: 1px solid #999;
background: #f0f0f0 url(../images/print_hover.png) no-repeat center right;
}
button.DTTT_button_text {
}
button.DTTT_button_text_hover {
border: 1px solid #999;
background-color: #f0f0f0;
}
button.DTTT_button_collection {
padding-right: 17px;
background: url(../images/collection.png) no-repeat center right;
}
button.DTTT_button_collection_hover {
padding-right: 17px;
border: 1px solid #999;
background: #f0f0f0 url(../images/collection_hover.png) no-repeat center right;
}
/*
* SELECTING
* Row selection styles
*/
table.DTTT_selectable tbody tr {
cursor: pointer;
*cursor: hand;
}
tr.DTTT_selected.odd {
background-color: #9FAFD1;
}
tr.DTTT_selected.odd td.sorting_1 {
background-color: #9FAFD1;
}
tr.DTTT_selected.odd td.sorting_2 {
background-color: #9FAFD1;
}
tr.DTTT_selected.odd td.sorting_3 {
background-color: #9FAFD1;
}
tr.DTTT_selected.even {
background-color: #B0BED9;
}
tr.DTTT_selected.even td.sorting_1 {
background-color: #B0BED9;
}
tr.DTTT_selected.even td.sorting_2 {
background-color: #B0BED9;
}
tr.DTTT_selected.even td.sorting_3 {
background-color: #B0BED9;
}
/*
* COLLECTIONS
* Drop down list (collection) styles
*/
div.DTTT_collection {
width: 150px;
padding: 3px;
border: 1px solid #ccc;
background-color: #f3f3f3;
overflow: hidden;
z-index: 2002;
}
div.DTTT_collection_background {
background: transparent url(../images/background.png) repeat top left;
z-index: 2001;
}
div.DTTT_collection button.DTTT_button {
float: none;
width: 100%;
margin-bottom: 2px;
background-color: white;
}
/*
* PRINTING
* Print display styles
*/
.DTTT_print_info {
position: absolute;
top: 50%;
left: 50%;
width: 400px;
height: 150px;
margin-left: -200px;
margin-top: -75px;
text-align: center;
background-color: #3f3f3f;
color: white;
padding: 10px 30px;
opacity: 0.9;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
}
.DTTT_print_info h6 {
font-weight: normal;
font-size: 28px;
line-height: 28px;
margin: 1em;
}
.DTTT_print_info p {
font-size: 14px;
line-height: 20px;
}
/*
* MISC
* Minor misc styles
*/
.DTTT_disabled {
color: #999;
}

View File

@ -39,7 +39,7 @@ body {
}
.schedule .tabs li {
width: 105px;
width: 103px;
height: 80px;
display: inline-block;
font-size: 14px;

View File

@ -28,7 +28,7 @@ body {
}
.schedule .tabs li {
width: 105px;
width: 103px;
height: 80px;
display: inline-block;
font-size: 14px;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -110,7 +110,6 @@
.context-menu-item.icon-paste { background-image: url(images/icon_paste_cm.png); }
.context-menu-item.icon-delete { background-image: url(images/icon_delete_cm.png); }
.context-menu-item.icon-quit { background-image: url(images/icon_door_cm.png); }
.context-menu-item.icon-soundcloud { background-image: url(images/icon_soundcloud_cm.png); }
.context-menu-item.icon-download { background-image: url(images/icon_download_cm.png); }
.context-menu-item.icon-overview { background-image: url(images/icon_overview_cm.png); }

View File

@ -2326,16 +2326,6 @@ span.errors.sp-errors{
background:url(images/icon_rebroadcast.png) no-repeat 0 0;
margin-top: 0px !important;
}
.small-icon.soundcloud {
background:url(images/icon_soundcloud.png) no-repeat 0 0;
width:21px;
margin-top: 0px !important;
}
.small-icon.sc-error {
background:url(images/icon_soundcloud_error2.png) no-repeat 0 0;
width:21px;
margin-top: 0px !important;
}
.small-icon.now-playing {
background:url(images/icon_play_cal.png) no-repeat 0 0;
height:10px;
@ -2387,10 +2377,6 @@ span.errors.sp-errors{
.medium-icon.rebroadcast {
background:url(images/icon_rebroadcast_m.png) no-repeat 0 0;
}
.medium-icon.soundcloud {
background:url(images/icon_soundcloud_m.png) no-repeat 0 0;
width:21px;
}
.medium-icon.nowplaying, .medium-icon.finishedplaying {
background:url(images/icon_nowplaying_m.png) no-repeat 0 0;
width:12px;
@ -4199,11 +4185,6 @@ li .ui-state-hover {
/* Publishing Dialog */
.icon-soundcloud-white {
background: url(images/icon_soundcloud_cm_white.png) 0 0 no-repeat;
width: 24px;
}
.source-name {
text-align: left !important;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@ -236,16 +236,15 @@ var AIRTIME = (function(AIRTIME) {
"</div>"
);
if (onDashboard) {
$menu.append(
"<div class='btn-group' title=" + $.i18n._('Publish') + ">" +
"<button class='btn btn-small' id='publish-btn'>" +
"<i class='icon-soundcloud-white'></i>" +
"<span>" + $.i18n._('Publish') + "</span>" +
"</button>" +
"</div>"
);
}
if (onDashboard) {
$menu.append(
"<div class='btn-group' title=" + $.i18n._('Publish') + ">" +
"<button class='btn btn-small' id='publish-btn'>" +
"<span>" + $.i18n._('Publish') + "</span>" +
"</button>" +
"</div>"
);
}
};
mod.createToolbarDropDown = function() {
@ -1325,25 +1324,6 @@ var AIRTIME = (function(AIRTIME) {
};
oItems.download.callback = callback;
}
// add callbacks for Soundcloud menu items.
if (oItems.soundcloud !== undefined) {
var soundcloud = oItems.soundcloud.items;
if (soundcloud.update !== undefined) {
callback = function() {
$.post(soundcloud.update.url, function () {});
};
soundcloud.update.callback = callback;
}
// define a view on soundcloud callback
if (soundcloud.view !== undefined) {
callback = function() {
window.open(soundcloud.view.url);
};
soundcloud.view.callback = callback;
}
}
// add callbacks for duplicate menu items.
if (oItems.duplicate !== undefined) {
var url = oItems.duplicate.url;

View File

@ -16,15 +16,6 @@ var AIRTIME = (function (AIRTIME) {
var publishApp = angular.module(PUBLISH_APP_NAME, [])
.controller('Publish', function ($sce, $scope, $http, mediaId, tab) {
$scope.publishData = {};
var isAdmin = userType == 'A' || userType == 'S';
// Javascript enum containing source connection HTML strings (ie. Connect with SoundCloud button)
$scope.sourceConnectEnum = Object.freeze({
soundcloud: isAdmin ? $sce.trustAsHtml(
"<a href='" + baseUrl + "soundcloud/authorize' target='_blank'>" +
"<img src='http://connect.soundcloud.com/2/btn-connect-sc-l.png'>" +
"</a>"
) : $sce.trustAsHtml($.i18n._("Ask your station administrator to connect to SoundCloud."))
});
var sourceInterval;
tab.contents.on("click", "input[type='checkbox']", function () {
@ -84,11 +75,7 @@ var AIRTIME = (function (AIRTIME) {
var data = {};
jQuery.each($scope.publishData, function (k, v) {
if (v) {
if (k == "soundcloud") {
alert($.i18n._("Your track is being uploaded and will "
+ "appear on SoundCloud in a couple of minutes"));
}
data[k] = 'publish'; // FIXME: should be more robust
data[k] = 'publish'; // FIXME: should be more robust
}
});
@ -106,13 +93,10 @@ var AIRTIME = (function (AIRTIME) {
$scope.remove = function (source) {
var data = {};
data[source] = 'unpublish'; // FIXME: should be more robust
if (source != "soundcloud" || confirm($.i18n._("Are you sure? SoundCloud stats and comments "
+ "for this track will be permanently removed."))) {
$http.put(endpoint + mediaId + '/publish', {csrf_token: jQuery("#csrf").val(), sources: data})
.success(function () {
fetchSourceData();
});
}
$http.put(endpoint + mediaId + '/publish', {csrf_token: jQuery("#csrf").val(), sources: data})
.success(function () {
fetchSourceData();
});
};
$scope.discard = function () {

View File

@ -1,14 +0,0 @@
/*$(document).ready(function() {
$(".media_type_selector").on("click", function() {
console.log("hello");
console.log(location.hash);
if (!$(this).hasClass("selected")) {
//AIRTIME.library.selectNone();
$(".media_type_selector").each(function () {
$(this).removeClass("selected");
});
$(this).addClass("selected");
oTable.fnDraw();
}
});
});*/

View File

@ -38,8 +38,10 @@ $(document).ready(function() {
language = language.replace("-", "_");
$("#setup_language").val(language);
var timezone = jstz.determine();
var timezone_name = timezone.name();
dayjs.extend(utc)
dayjs.extend(timezone)
var timezone_name = dayjs.tz.guess();
if (timezone_name === undefined) {
timezone_name = "America/Toronto";
}

View File

@ -7,46 +7,10 @@ var AIRTIME = (function(AIRTIME) {
mod = AIRTIME.history;
var $historyContentDiv;
var oTableTools = {
"sSwfPath": baseUrl+"js/datatables/plugin/TableTools-2.1.5/swf/copy_csv_xls_pdf.swf",
"aButtons": [
{
"sExtends": "copy",
"fnComplete": function(nButton, oConfig, oFlash, text) {
var lines = text.split('\n').length,
len = this.s.dt.nTFoot === null ? lines-1 : lines-2,
plural = (len==1) ? "" : "s";
alert(sprintf($.i18n._('Copied %s row%s to the clipboard'), len, plural));
},
//set because only the checkbox row is not sortable.
"mColumns": "sortable"
},
{
"sExtends": "csv",
"fnClick": setFlashFileName,
//set because only the checkbox row is not sortable.
"mColumns": "sortable"
},
{
"sExtends": "pdf",
"fnClick": setFlashFileName,
"sPdfOrientation": "landscape",
//set because only the checkbox row is not sortable.
"mColumns": "sortable"
},
{
"sExtends": "print",
"sInfo" : sprintf($.i18n._("%sPrint view%sPlease use your browser's print function to print this table. Press escape when finished."), "<h6>", "</h6><p>"),
//set because only the checkbox row is not sortable.
"mColumns": "sortable"
}
]
};
var lengthMenu = [[10, 25, 50, 100, 500, -1], [10, 25, 50, 100, 500, $.i18n._("All")]];
var sDom = 'l<"dt-process-rel"r><"H"T><"dataTables_scrolling"t><"F"ip>';
var sDom = 'l<"dt-process-rel"r><"H"><"dataTables_scrolling"t><"F"ip>';
var selectedLogItems = {};
@ -155,25 +119,6 @@ var AIRTIME = (function(AIRTIME) {
}
return filename;
}
function setFlashFileName( nButton, oConfig, oFlash ) {
var filename = getFileName(oConfig.sExtends);
oFlash.setFileName( filename );
if (oConfig.sExtends == "pdf") {
this.fnSetText( oFlash,
"title:"+ this.fnGetTitle(oConfig) +"\n"+
"message:"+ oConfig.sPdfMessage +"\n"+
"colWidth:"+ this.fnCalcColRatios(oConfig) +"\n"+
"orientation:"+ oConfig.sPdfOrientation +"\n"+
"size:"+ oConfig.sPdfSize +"\n"+
"--/TableToolsOpts--\n" +
this.fnGetTableData(oConfig));
}
else {
this.fnSetText(oFlash, this.fnGetTableData(oConfig));
}
}
/* This callback can be used for all history tables */
function fnServerData( sSource, aoData, fnCallback ) {
@ -298,7 +243,6 @@ var AIRTIME = (function(AIRTIME) {
"</button>" +
"</div>");
$menu.append("<div class='btn-group'>" +
"<button class='btn btn-small dropdown-toggle' data-toggle='dropdown'>" +
$.i18n._("Select")+" <span class='caret'></span>" +
@ -308,13 +252,23 @@ var AIRTIME = (function(AIRTIME) {
"<li class='his-dselect-page'><a href='#'>"+$.i18n._("Deselect this page")+"</a></li>" +
"<li class='his-dselect-all'><a href='#'>"+$.i18n._("Deselect all")+"</a></li>" +
"</ul>" +
"</div>");
"</div>");
$menu.append("<div class='btn-group'>" +
"<button class='btn btn-small dropdown-toggle' data-toggle='dropdown'>" +
$.i18n._("Export")+" <span class='caret'></span>" +
"</button>" +
"<ul class='dropdown-menu'>" +
"<li id='csv_export'><a href='#'>"+$.i18n._("Export as CSV")+"</a></li>" +
"<li id='pdf_export'><a href='#'>"+$.i18n._("Export as PDF")+"</a></li>" +
"</ul>" +
"</div>");
$menu.append("<div class='btn-group'>" +
"<button class='btn btn-small' id='his_trash'>" +
"<i class='icon-white icon-trash'></i>" +
"</button>" +
"</div>");
"</div>");
$el.append($menu);
}
@ -357,7 +311,6 @@ var AIRTIME = (function(AIRTIME) {
"bJQueryUI": true,
"bAutoWidth": true,
"sDom": sDom,
"oTableTools": oTableTools
});
oTable.fnSetFilteringDelay(350);
@ -430,7 +383,6 @@ var AIRTIME = (function(AIRTIME) {
"bJQueryUI": true,
"bAutoWidth": true,
"sDom": sDom,
"oTableTools": oTableTools
});
oTable.fnSetFilteringDelay(350);
@ -565,7 +517,9 @@ var AIRTIME = (function(AIRTIME) {
removeHistoryDialog();
}
});
}
}
hisSubmit(); // Fixes display bug
/*
* Icon hover states for search.
@ -625,7 +579,114 @@ var AIRTIME = (function(AIRTIME) {
makeHistoryDialog(json.dialog);
}, "json");
});
});
$historyContentDiv.on("click", "#pdf_export", async function(){
// Get date/time from pickers
var startDay = document.querySelector('#his_date_start').value;
var startTime = document.querySelector('#his_time_start').value;
var endDay = document.querySelector('#his_date_end').value;
var endTime = document.querySelector('#his_time_end').value;
var url = baseUrl + "api/item-history-feed?start=" + startDay + " " + startTime + "&end=" + endDay + " " + endTime;
var requestData = await fetch(url);
var hisData = await requestData.json();
if (!hisData.length) {
alert("The date range selected doesn't have any items to export.");
return
} else {
// Generate PDF template
var dd = {
content: [
{text: 'Libretime', style: 'subheader'},
{text: 'Playout History from ' + startDay + ' ' + startTime + ' to ' + endDay + ' ' + endTime, style: 'header'},
{
style: 'mainTable',
table: {
headerRows: 1,
body: [
[{text: 'Start Time', style: 'tableHeader'}, {text: 'End Time', style: 'tableHeader'}, {text: 'Song', style: 'tableHeader'}, {text: 'Artist', style: 'tableHeader'}],
]
}
}
],
styles: {
header: {
fontSize: 18,
bold: true,
margin: [0, 0, 0, 10]
},
subheader: {
fontSize: 14,
bold: true,
margin: [0, 10, 0, 5]
},
mainTable: {
margin: [0, 5, 0, 15]
},
tableHeader: {
bold: true,
fontSize: 13,
color: 'black'
}
},
defaultStyle: {
}
};
hisData.forEach(element => {
// Removing extra fields
delete element.checkbox;
delete element.history_id;
delete element.instance_id;
dd.content[2].table.body.push(Object.values(element));
});
// Make PDF and start download
pdfMake.createPdf(dd).download();
};
});
$historyContentDiv.on("click", "#csv_export", async function(){
// Get date/time from pickers
var startDay = document.querySelector('#his_date_start').value;
var startTime = document.querySelector('#his_time_start').value;
var endDay = document.querySelector('#his_date_end').value;
var endTime = document.querySelector('#his_time_end').value;
var url = baseUrl + "api/item-history-feed?start=" + startDay + " " + startTime + "&end=" + endDay + " " + endTime;
var requestData = await fetch(url);
var hisData = await requestData.json();
if (!hisData.length) {
alert("The date range selected doesn't have any items to export.");
return
} else {
// Clean returned data
hisData.forEach(element => {
// Start date/time
element.startDate = element.starts.split(" ")[0];
element.startTime = element.starts.split(" ")[1];
// End date/time
element.endDate = element.ends.split(" ")[0];
element.endTime = element.ends.split(" ")[1];
// Moving Title and Artist fields to the end
element.title = element.track_title;
element.artist = element.artist_name;
// Removing extra fields
delete element.checkbox;
delete element.history_id;
delete element.instance_id;
delete element.starts; // we already converted these, so we don't need them anymore
delete element.ends;
delete element.track_title;
delete element.artist_name;
});
};
var csvX = new CSVExport(hisData); // Actual export function
return false // Was part of the demo. Please leave as is.
});
$('body').on("click", ".his_file_cancel, .his_item_cancel", function(e) {
removeHistoryDialog();
@ -766,23 +827,26 @@ var AIRTIME = (function(AIRTIME) {
return AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId);
}
function hisSubmit(){
var fn, info;
info = getStartEnd();
fn = fnServerData;
fn.start = info.start;
fn.end = info.end;
if (inShowsTab) {
showSummaryList(info.start, info.end);
}
else {
redrawTables();
};
};
$historyContentDiv.find("#his_submit").click(function(ev){
var fn,
info;
info = getStartEnd();
fn = fnServerData;
fn.start = info.start;
fn.end = info.end;
if (inShowsTab) {
showSummaryList(info.start, info.end);
}
else {
redrawTables();
}
hisSubmit();
});
$historyContentDiv.on("click", ".his-select-page", selectCurrentPage);

View File

@ -95,20 +95,6 @@ function setTuneInSettingsReadonly() {
}
}
function setSoundCloudSettingsListener() {
var connect = $("#SoundCloudConnect"),
disconnect = $("#SoundCloudDisconnect");
connect.click(function(e){
e.preventDefault();
window.location.replace(baseUrl + "soundcloud/authorize");
});
disconnect.click(function(e){
e.preventDefault();
window.location.replace(baseUrl + "soundcloud/deauthorize");
});
}
/*
* Enable/disable mail server authentication fields
*/
@ -208,5 +194,4 @@ $(document).ready(function() {
setEnableSystemEmailsListener();
setTuneInSettingsReadonly();
setTuneInSettingsListener();
setSoundCloudSettingsListener();
});

View File

@ -4,6 +4,10 @@
*
*/
// Init Day.JS plugins
dayjs.extend(window.dayjs_plugin_utc);
dayjs.extend(window.dayjs_plugin_timezone);
function openAddShowForm(nowOrFuture) {
if($("#add-show-form").length == 1) {
if( ($("#add-show-form").css('display')=='none')) {
@ -63,7 +67,7 @@ function setupStartTimeWidgets() {
var currentTimezone = $("#add_show_timezone").val();
//Set the show start time to now (in the show timezone)
var now = moment(new Date()).tz(currentTimezone);
var now = dayjs(new Date()).tz(currentTimezone);
$('#add_show_start_date').val(now.format('YYYY-MM-DD'));
$('#add_show_start_time').val(now.format('HH:mm'));

Some files were not shown because too many files have changed in this diff Show More