fix(soundcloud): remove broken integration

This commit is contained in:
Lucas Bickel 2021-01-06 12:20:23 +00:00 committed by GitHub
parent ecd302068c
commit 4c72403b9b
85 changed files with 133081 additions and 118229 deletions

View File

@ -52,12 +52,6 @@ Linked code:
- License: LGPLv2.1 - License: LGPLv2.1
- Compatible with GPLv3? Yes - 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() * getID3()
- What is it: PHP script that extracts useful information from MP3s & other multimedia file formats: - What is it: PHP script that extracts useful information from MP3s & other multimedia file formats:
- Web site: https://github.com/JamesHeinrich/getID3 - Web site: https://github.com/JamesHeinrich/getID3

View File

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

View File

@ -64,13 +64,7 @@ class Config {
$CC_CONFIG['dsn']['database'] = $values['database']['dbname']; $CC_CONFIG['dsn']['database'] = $values['database']['dbname'];
$CC_CONFIG['apiKey'] = array($values['general']['api_key']); $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'])) { if (isset($values['facebook']['facebook_app_id'])) {
$CC_CONFIG['facebook-app-id'] = $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']; $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 //TuneIn integration
define("TUNEIN_API_URL", "http://air.radiotime.com/Playing.ashx"); 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 // Celery
define('CELERY_PENDING_STATUS', 'PENDING'); define('CELERY_PENDING_STATUS', 'PENDING');
define('CELERY_SUCCESS_STATUS', 'SUCCESS'); define('CELERY_SUCCESS_STATUS', 'SUCCESS');
define('CELERY_FAILED_STATUS', 'FAILED'); define('CELERY_FAILED_STATUS', 'FAILED');
// Celery Services // Celery Services
define('SOUNDCLOUD_SERVICE_NAME', 'soundcloud');
define('PODCAST_SERVICE_NAME', 'podcast'); define('PODCAST_SERVICE_NAME', 'podcast');
// Publish Services // Publish Services

View File

@ -119,7 +119,7 @@ class LibraryController extends Zend_Controller_Action
if ($isAdminOrPM || $file->getFileOwnerId() == $user->getId()) { if ($isAdminOrPM || $file->getFileOwnerId() == $user->getId()) {
$menu["del"] = array("name"=> _("Delete"), "icon" => "delete", "url" => $baseUrl."library/delete"); $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["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) // 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"; $url = $baseUrl."api/get-media/file/$id/download/true";
$menu["download"] = array("name" => _("Download"), "icon" => "download", "url" => $url); $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") { } elseif ($type === "playlist" || $type === "block") {
if ($type === 'playlist') { if ($type === 'playlist') {
$obj = new Application_Model_Playlist($id); $obj = new Application_Model_Playlist($id);

View File

@ -122,12 +122,6 @@ final class LocaleController extends Zend_Controller_Action
"Import" => _("Import"), "Import" => _("Import"),
"Imported?" => _("Imported?"), "Imported?" => _("Imported?"),
"View" => _("View"), "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 code: " => _("Error code: "),
"Error msg: " => _("Error msg: "), "Error msg: " => _("Error msg: "),
"Input must be a positive number" => _("Input must be a positive number"), "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"), "60m" => _("60m"),
"Uploading in progress..." => _("Uploading in progress..."), "Uploading in progress..." => _("Uploading in progress..."),
"Retreiving data from the server..." => _("Retreiving data from the server..."), "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 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."), "This show is not completely filled with content." => _("This show is not completely filled with content."),
//already in schedule/add-show.js //already in schedule/add-show.js

View File

@ -71,12 +71,6 @@ class PreferenceController extends Zend_Controller_Action
Application_Model_Preference::setTuneinPartnerKey($values["tunein_partner_key"]); Application_Model_Preference::setTuneinPartnerKey($values["tunein_partner_key"]);
Application_Model_Preference::setTuneinPartnerId($values["tunein_partner_id"]); 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>"; $this->view->statusMsg = "<div class='success'>". _("Preferences updated.")."</div>";
$form = new Application_Form_Preferences(); $form = new Application_Form_Preferences();
$this->view->form = $form; $this->view->form = $form;

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

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

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

@ -1389,38 +1389,6 @@ class Application_Model_Preference
self::setValue("last_tunein_metadata_update", $value); 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 // TaskManager Lock Timestamp
public static function getTaskManagerLock() { public static function getTaskManagerLock() {

View File

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

View File

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

View File

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

View File

@ -96,11 +96,6 @@ class CcFilesTableMap extends TableMap
$this->addColumn('contributor', 'DbContributor', 'VARCHAR', false, 512, null); $this->addColumn('contributor', 'DbContributor', 'VARCHAR', false, 512, null);
$this->addColumn('language', 'DbLanguage', 'VARCHAR', false, 512, null); $this->addColumn('language', 'DbLanguage', 'VARCHAR', false, 512, null);
$this->addColumn('file_exists', 'DbFileExists', 'BOOLEAN', false, null, true); $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->addColumn('replay_gain', 'DbReplayGain', 'NUMERIC', false, null, null);
$this->addForeignKey('owner_id', 'DbOwnerId', 'INTEGER', 'cc_subjs', 'id', 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'); $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; 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. * The value for the replay_gain field.
* @var string * @var string
@ -1375,85 +1345,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->file_exists; 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. * Get the [replay_gain] column value.
* *
@ -2823,113 +2714,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this; return $this;
} // setDbFileExists() } // 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. * 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->contributor = ($row[$startcol + 54] !== null) ? (string) $row[$startcol + 54] : null;
$this->language = ($row[$startcol + 55] !== null) ? (string) $row[$startcol + 55] : 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->file_exists = ($row[$startcol + 56] !== null) ? (boolean) $row[$startcol + 56] : null;
$this->soundcloud_id = ($row[$startcol + 57] !== null) ? (int) $row[$startcol + 57] : null; $this->replay_gain = ($row[$startcol + 57] !== null) ? (string) $row[$startcol + 57] : null;
$this->soundcloud_error_code = ($row[$startcol + 58] !== null) ? (int) $row[$startcol + 58] : null; $this->owner_id = ($row[$startcol + 58] !== null) ? (int) $row[$startcol + 58] : null;
$this->soundcloud_error_msg = ($row[$startcol + 59] !== null) ? (string) $row[$startcol + 59] : null; $this->cuein = ($row[$startcol + 59] !== null) ? (string) $row[$startcol + 59] : null;
$this->soundcloud_link_to_file = ($row[$startcol + 60] !== null) ? (string) $row[$startcol + 60] : null; $this->cueout = ($row[$startcol + 60] !== null) ? (string) $row[$startcol + 60] : null;
$this->soundcloud_upload_time = ($row[$startcol + 61] !== null) ? (string) $row[$startcol + 61] : null; $this->silan_check = ($row[$startcol + 61] !== null) ? (boolean) $row[$startcol + 61] : null;
$this->replay_gain = ($row[$startcol + 62] !== null) ? (string) $row[$startcol + 62] : null; $this->hidden = ($row[$startcol + 62] !== null) ? (boolean) $row[$startcol + 62] : null;
$this->owner_id = ($row[$startcol + 63] !== null) ? (int) $row[$startcol + 63] : null; $this->is_scheduled = ($row[$startcol + 63] !== null) ? (boolean) $row[$startcol + 63] : null;
$this->cuein = ($row[$startcol + 64] !== null) ? (string) $row[$startcol + 64] : null; $this->is_playlist = ($row[$startcol + 64] !== null) ? (boolean) $row[$startcol + 64] : null;
$this->cueout = ($row[$startcol + 65] !== null) ? (string) $row[$startcol + 65] : null; $this->filesize = ($row[$startcol + 65] !== null) ? (int) $row[$startcol + 65] : null;
$this->silan_check = ($row[$startcol + 66] !== null) ? (boolean) $row[$startcol + 66] : null; $this->description = ($row[$startcol + 66] !== null) ? (string) $row[$startcol + 66] : null;
$this->hidden = ($row[$startcol + 67] !== null) ? (boolean) $row[$startcol + 67] : null; $this->artwork = ($row[$startcol + 67] !== null) ? (string) $row[$startcol + 67] : null;
$this->is_scheduled = ($row[$startcol + 68] !== null) ? (boolean) $row[$startcol + 68] : null; $this->track_type = ($row[$startcol + 68] !== null) ? (string) $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->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
@ -3351,7 +3130,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
} }
$this->postHydrate($row, $startcol, $rehydrate); $this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 72; // 72 = CcFilesPeer::NUM_HYDRATE_COLUMNS. return $startcol + 69; // 69 = CcFilesPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating CcFiles object", $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)) { if ($this->isColumnModified(CcFilesPeer::FILE_EXISTS)) {
$modifiedColumns[':p' . $index++] = '"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)) { if ($this->isColumnModified(CcFilesPeer::REPLAY_GAIN)) {
$modifiedColumns[':p' . $index++] = '"replay_gain"'; $modifiedColumns[':p' . $index++] = '"replay_gain"';
} }
@ -4167,21 +3931,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
case '"file_exists"': case '"file_exists"':
$stmt->bindValue($identifier, $this->file_exists, PDO::PARAM_BOOL); $stmt->bindValue($identifier, $this->file_exists, PDO::PARAM_BOOL);
break; 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"': case '"replay_gain"':
$stmt->bindValue($identifier, $this->replay_gain, PDO::PARAM_INT); $stmt->bindValue($identifier, $this->replay_gain, PDO::PARAM_INT);
break; break;
@ -4605,54 +4354,39 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->getDbFileExists(); return $this->getDbFileExists();
break; break;
case 57: 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(); return $this->getDbReplayGain();
break; break;
case 63: case 58:
return $this->getDbOwnerId(); return $this->getDbOwnerId();
break; break;
case 64: case 59:
return $this->getDbCuein(); return $this->getDbCuein();
break; break;
case 65: case 60:
return $this->getDbCueout(); return $this->getDbCueout();
break; break;
case 66: case 61:
return $this->getDbSilanCheck(); return $this->getDbSilanCheck();
break; break;
case 67: case 62:
return $this->getDbHidden(); return $this->getDbHidden();
break; break;
case 68: case 63:
return $this->getDbIsScheduled(); return $this->getDbIsScheduled();
break; break;
case 69: case 64:
return $this->getDbIsPlaylist(); return $this->getDbIsPlaylist();
break; break;
case 70: case 65:
return $this->getDbFilesize(); return $this->getDbFilesize();
break; break;
case 71: case 66:
return $this->getDbDescription(); return $this->getDbDescription();
break; break;
case 72: case 67:
return $this->getDbArtwork(); return $this->getDbArtwork();
break; break;
case 73: case 68:
return $this->getDbTrackType(); return $this->getDbTrackType();
break; break;
default: default:
@ -4741,23 +4475,18 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$keys[54] => $this->getDbContributor(), $keys[54] => $this->getDbContributor(),
$keys[55] => $this->getDbLanguage(), $keys[55] => $this->getDbLanguage(),
$keys[56] => $this->getDbFileExists(), $keys[56] => $this->getDbFileExists(),
$keys[57] => $this->getDbSoundcloudId(), $keys[57] => $this->getDbReplayGain(),
$keys[58] => $this->getDbSoundcloudErrorCode(), $keys[58] => $this->getDbOwnerId(),
$keys[59] => $this->getDbSoundcloudErrorMsg(), $keys[59] => $this->getDbCuein(),
$keys[60] => $this->getDbSoundcloudLinkToFile(), $keys[60] => $this->getDbCueout(),
$keys[61] => $this->getDbSoundCloundUploadTime(), $keys[61] => $this->getDbSilanCheck(),
$keys[62] => $this->getDbReplayGain(), $keys[62] => $this->getDbHidden(),
$keys[63] => $this->getDbOwnerId(), $keys[63] => $this->getDbIsScheduled(),
$keys[64] => $this->getDbCuein(), $keys[64] => $this->getDbIsPlaylist(),
$keys[65] => $this->getDbCueout(), $keys[65] => $this->getDbFilesize(),
$keys[66] => $this->getDbSilanCheck(), $keys[66] => $this->getDbDescription(),
$keys[67] => $this->getDbHidden(), $keys[67] => $this->getDbArtwork(),
$keys[68] => $this->getDbIsScheduled(), $keys[68] => $this->getDbTrackType(),
$keys[69] => $this->getDbIsPlaylist(),
$keys[70] => $this->getDbFilesize(),
$keys[71] => $this->getDbDescription(),
$keys[72] => $this->getDbArtwork(),
$keys[73] => $this->getDbTrackType(),
); );
$virtualColumns = $this->virtualColumns; $virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) { foreach ($virtualColumns as $key => $virtualColumn) {
@ -5004,54 +4733,39 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->setDbFileExists($value); $this->setDbFileExists($value);
break; break;
case 57: 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); $this->setDbReplayGain($value);
break; break;
case 63: case 58:
$this->setDbOwnerId($value); $this->setDbOwnerId($value);
break; break;
case 64: case 59:
$this->setDbCuein($value); $this->setDbCuein($value);
break; break;
case 65: case 60:
$this->setDbCueout($value); $this->setDbCueout($value);
break; break;
case 66: case 61:
$this->setDbSilanCheck($value); $this->setDbSilanCheck($value);
break; break;
case 67: case 62:
$this->setDbHidden($value); $this->setDbHidden($value);
break; break;
case 68: case 63:
$this->setDbIsScheduled($value); $this->setDbIsScheduled($value);
break; break;
case 69: case 64:
$this->setDbIsPlaylist($value); $this->setDbIsPlaylist($value);
break; break;
case 70: case 65:
$this->setDbFilesize($value); $this->setDbFilesize($value);
break; break;
case 71: case 66:
$this->setDbDescription($value); $this->setDbDescription($value);
break; break;
case 72: case 67:
$this->setDbArtwork($value); $this->setDbArtwork($value);
break; break;
case 73: case 68:
$this->setDbTrackType($value); $this->setDbTrackType($value);
break; break;
} // switch() } // 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[54], $arr)) $this->setDbContributor($arr[$keys[54]]);
if (array_key_exists($keys[55], $arr)) $this->setDbLanguage($arr[$keys[55]]); 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[56], $arr)) $this->setDbFileExists($arr[$keys[56]]);
if (array_key_exists($keys[57], $arr)) $this->setDbSoundcloudId($arr[$keys[57]]); if (array_key_exists($keys[57], $arr)) $this->setDbReplayGain($arr[$keys[57]]);
if (array_key_exists($keys[58], $arr)) $this->setDbSoundcloudErrorCode($arr[$keys[58]]); if (array_key_exists($keys[58], $arr)) $this->setDbOwnerId($arr[$keys[58]]);
if (array_key_exists($keys[59], $arr)) $this->setDbSoundcloudErrorMsg($arr[$keys[59]]); if (array_key_exists($keys[59], $arr)) $this->setDbCuein($arr[$keys[59]]);
if (array_key_exists($keys[60], $arr)) $this->setDbSoundcloudLinkToFile($arr[$keys[60]]); if (array_key_exists($keys[60], $arr)) $this->setDbCueout($arr[$keys[60]]);
if (array_key_exists($keys[61], $arr)) $this->setDbSoundCloundUploadTime($arr[$keys[61]]); if (array_key_exists($keys[61], $arr)) $this->setDbSilanCheck($arr[$keys[61]]);
if (array_key_exists($keys[62], $arr)) $this->setDbReplayGain($arr[$keys[62]]); if (array_key_exists($keys[62], $arr)) $this->setDbHidden($arr[$keys[62]]);
if (array_key_exists($keys[63], $arr)) $this->setDbOwnerId($arr[$keys[63]]); if (array_key_exists($keys[63], $arr)) $this->setDbIsScheduled($arr[$keys[63]]);
if (array_key_exists($keys[64], $arr)) $this->setDbCuein($arr[$keys[64]]); if (array_key_exists($keys[64], $arr)) $this->setDbIsPlaylist($arr[$keys[64]]);
if (array_key_exists($keys[65], $arr)) $this->setDbCueout($arr[$keys[65]]); if (array_key_exists($keys[65], $arr)) $this->setDbFilesize($arr[$keys[65]]);
if (array_key_exists($keys[66], $arr)) $this->setDbSilanCheck($arr[$keys[66]]); if (array_key_exists($keys[66], $arr)) $this->setDbDescription($arr[$keys[66]]);
if (array_key_exists($keys[67], $arr)) $this->setDbHidden($arr[$keys[67]]); if (array_key_exists($keys[67], $arr)) $this->setDbArtwork($arr[$keys[67]]);
if (array_key_exists($keys[68], $arr)) $this->setDbIsScheduled($arr[$keys[68]]); if (array_key_exists($keys[68], $arr)) $this->setDbTrackType($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]]);
} }
/** /**
@ -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::CONTRIBUTOR)) $criteria->add(CcFilesPeer::CONTRIBUTOR, $this->contributor);
if ($this->isColumnModified(CcFilesPeer::LANGUAGE)) $criteria->add(CcFilesPeer::LANGUAGE, $this->language); 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::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::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::OWNER_ID)) $criteria->add(CcFilesPeer::OWNER_ID, $this->owner_id);
if ($this->isColumnModified(CcFilesPeer::CUEIN)) $criteria->add(CcFilesPeer::CUEIN, $this->cuein); 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->setDbContributor($this->getDbContributor());
$copyObj->setDbLanguage($this->getDbLanguage()); $copyObj->setDbLanguage($this->getDbLanguage());
$copyObj->setDbFileExists($this->getDbFileExists()); $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->setDbReplayGain($this->getDbReplayGain());
$copyObj->setDbOwnerId($this->getDbOwnerId()); $copyObj->setDbOwnerId($this->getDbOwnerId());
$copyObj->setDbCuein($this->getDbCuein()); $copyObj->setDbCuein($this->getDbCuein());
@ -7759,11 +7458,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->contributor = null; $this->contributor = null;
$this->language = null; $this->language = null;
$this->file_exists = 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->replay_gain = null;
$this->owner_id = null; $this->owner_id = null;
$this->cuein = null; $this->cuein = null;

View File

@ -24,13 +24,13 @@ abstract class BaseCcFilesPeer
const TM_CLASS = 'CcFilesTableMap'; const TM_CLASS = 'CcFilesTableMap';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 72; const NUM_COLUMNS = 69;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */ /** 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 */ /** the column name for the id field */
const ID = 'cc_files.id'; const ID = 'cc_files.id';
@ -203,21 +203,6 @@ abstract class BaseCcFilesPeer
/** the column name for the file_exists field */ /** the column name for the file_exists field */
const FILE_EXISTS = 'cc_files.file_exists'; 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 */ /** the column name for the replay_gain field */
const REPLAY_GAIN = 'cc_files.replay_gain'; const REPLAY_GAIN = 'cc_files.replay_gain';
@ -273,12 +258,12 @@ abstract class BaseCcFilesPeer
* e.g. CcFilesPeer::$fieldNames[CcFilesPeer::TYPE_PHPNAME][0] = 'Id' * e.g. CcFilesPeer::$fieldNames[CcFilesPeer::TYPE_PHPNAME][0] = 'Id'
*/ */
protected static $fieldNames = array ( 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_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', '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', '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_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', '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_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', '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', '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_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 * e.g. CcFilesPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
protected static $fieldKeys = array ( 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_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, '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, '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::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_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, '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_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, '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, '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, 69, 70, 71, 72, 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, )
); );
/** /**
@ -424,11 +409,6 @@ abstract class BaseCcFilesPeer
$criteria->addSelectColumn(CcFilesPeer::CONTRIBUTOR); $criteria->addSelectColumn(CcFilesPeer::CONTRIBUTOR);
$criteria->addSelectColumn(CcFilesPeer::LANGUAGE); $criteria->addSelectColumn(CcFilesPeer::LANGUAGE);
$criteria->addSelectColumn(CcFilesPeer::FILE_EXISTS); $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::REPLAY_GAIN);
$criteria->addSelectColumn(CcFilesPeer::OWNER_ID); $criteria->addSelectColumn(CcFilesPeer::OWNER_ID);
$criteria->addSelectColumn(CcFilesPeer::CUEIN); $criteria->addSelectColumn(CcFilesPeer::CUEIN);
@ -499,11 +479,6 @@ abstract class BaseCcFilesPeer
$criteria->addSelectColumn($alias . '.contributor'); $criteria->addSelectColumn($alias . '.contributor');
$criteria->addSelectColumn($alias . '.language'); $criteria->addSelectColumn($alias . '.language');
$criteria->addSelectColumn($alias . '.file_exists'); $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 . '.replay_gain');
$criteria->addSelectColumn($alias . '.owner_id'); $criteria->addSelectColumn($alias . '.owner_id');
$criteria->addSelectColumn($alias . '.cuein'); $criteria->addSelectColumn($alias . '.cuein');

View File

@ -63,11 +63,6 @@
* @method CcFilesQuery orderByDbContributor($order = Criteria::ASC) Order by the contributor column * @method CcFilesQuery orderByDbContributor($order = Criteria::ASC) Order by the contributor column
* @method CcFilesQuery orderByDbLanguage($order = Criteria::ASC) Order by the language 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 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 orderByDbReplayGain($order = Criteria::ASC) Order by the replay_gain column
* @method CcFilesQuery orderByDbOwnerId($order = Criteria::ASC) Order by the owner_id column * @method CcFilesQuery orderByDbOwnerId($order = Criteria::ASC) Order by the owner_id column
* @method CcFilesQuery orderByDbCuein($order = Criteria::ASC) Order by the cuein 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 groupByDbContributor() Group by the contributor column
* @method CcFilesQuery groupByDbLanguage() Group by the language column * @method CcFilesQuery groupByDbLanguage() Group by the language column
* @method CcFilesQuery groupByDbFileExists() Group by the file_exists 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 groupByDbReplayGain() Group by the replay_gain column
* @method CcFilesQuery groupByDbOwnerId() Group by the owner_id column * @method CcFilesQuery groupByDbOwnerId() Group by the owner_id column
* @method CcFilesQuery groupByDbCuein() Group by the cuein 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 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 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 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 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 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 * @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 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 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 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 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 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 * @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) 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 { try {
$stmt = $con->prepare($sql); $stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT); $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@ -2436,191 +2416,6 @@ abstract class BaseCcFilesQuery extends ModelCriteria
return $this->addUsingAlias(CcFilesPeer::FILE_EXISTS, $dbFileExists, $comparison); 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 * Filter the query on the replay_gain column
* *

View File

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

View File

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

View File

@ -11,8 +11,6 @@ class PublishServiceFactory {
*/ */
public static function getService($serviceName) { public static function getService($serviceName) {
switch($serviceName) { switch($serviceName) {
case SOUNDCLOUD_SERVICE_NAME:
return new Application_Service_SoundcloudService();
case STATION_PODCAST_SERVICE_NAME: case STATION_PODCAST_SERVICE_NAME:
return new Application_Service_PodcastEpisodeService(); return new Application_Service_PodcastEpisodeService();
default: 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'; 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,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

@ -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 # 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="contributor" phpName="DbContributor" type="VARCHAR" size="512" required="false"/>
<column name="language" phpName="DbLanguage" 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="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="replay_gain" phpName="DbReplayGain" type="NUMERIC" required="false"/>
<column name="owner_id" phpName="DbOwnerId" type="INTEGER" 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"/> <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), "contributor" VARCHAR(512),
"language" VARCHAR(512), "language" VARCHAR(512),
"file_exists" BOOLEAN DEFAULT 't', "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, "replay_gain" NUMERIC,
"owner_id" INTEGER, "owner_id" INTEGER,
"cuein" interval DEFAULT '00:00:00', "cuein" interval DEFAULT '00:00:00',
@ -115,9 +110,9 @@ CREATE TABLE "cc_track_types"
( (
"id" serial NOT NULL, "id" serial NOT NULL,
"code" VARCHAR(16) DEFAULT '' NOT NULL, "code" VARCHAR(16) DEFAULT '' NOT NULL,
"visibility" BOOLEAN DEFAULT 't' NOT NULL,
"type_name" VARCHAR(64) DEFAULT '' NOT NULL, "type_name" VARCHAR(64) DEFAULT '' NOT NULL,
"description" VARCHAR(255) DEFAULT '' NOT NULL, "description" VARCHAR(255) DEFAULT '' NOT NULL,
"visibility" boolean DEFAULT true NOT NULL,
PRIMARY KEY ("id"), PRIMARY KEY ("id"),
CONSTRAINT "cc_track_types_id_idx" UNIQUE ("id"), CONSTRAINT "cc_track_types_id_idx" UNIQUE ("id"),
CONSTRAINT "cc_track_types_code_idx" UNIQUE ("code") 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

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-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-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-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-download { background-image: url(images/icon_download_cm.png); }
.context-menu-item.icon-overview { background-image: url(images/icon_overview_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; background:url(images/icon_rebroadcast.png) no-repeat 0 0;
margin-top: 0px !important; 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 { .small-icon.now-playing {
background:url(images/icon_play_cal.png) no-repeat 0 0; background:url(images/icon_play_cal.png) no-repeat 0 0;
height:10px; height:10px;
@ -2387,10 +2377,6 @@ span.errors.sp-errors{
.medium-icon.rebroadcast { .medium-icon.rebroadcast {
background:url(images/icon_rebroadcast_m.png) no-repeat 0 0; 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 { .medium-icon.nowplaying, .medium-icon.finishedplaying {
background:url(images/icon_nowplaying_m.png) no-repeat 0 0; background:url(images/icon_nowplaying_m.png) no-repeat 0 0;
width:12px; width:12px;
@ -4199,11 +4185,6 @@ li .ui-state-hover {
/* Publishing Dialog */ /* Publishing Dialog */
.icon-soundcloud-white {
background: url(images/icon_soundcloud_cm_white.png) 0 0 no-repeat;
width: 24px;
}
.source-name { .source-name {
text-align: left !important; text-align: left !important;
} }

View File

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

View File

@ -16,15 +16,6 @@ var AIRTIME = (function (AIRTIME) {
var publishApp = angular.module(PUBLISH_APP_NAME, []) var publishApp = angular.module(PUBLISH_APP_NAME, [])
.controller('Publish', function ($sce, $scope, $http, mediaId, tab) { .controller('Publish', function ($sce, $scope, $http, mediaId, tab) {
$scope.publishData = {}; $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; var sourceInterval;
tab.contents.on("click", "input[type='checkbox']", function () { tab.contents.on("click", "input[type='checkbox']", function () {
@ -84,11 +75,7 @@ var AIRTIME = (function (AIRTIME) {
var data = {}; var data = {};
jQuery.each($scope.publishData, function (k, v) { jQuery.each($scope.publishData, function (k, v) {
if (v) { if (v) {
if (k == "soundcloud") { data[k] = 'publish'; // FIXME: should be more robust
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
} }
}); });
@ -106,13 +93,10 @@ var AIRTIME = (function (AIRTIME) {
$scope.remove = function (source) { $scope.remove = function (source) {
var data = {}; var data = {};
data[source] = 'unpublish'; // FIXME: should be more robust data[source] = 'unpublish'; // FIXME: should be more robust
if (source != "soundcloud" || confirm($.i18n._("Are you sure? SoundCloud stats and comments " $http.put(endpoint + mediaId + '/publish', {csrf_token: jQuery("#csrf").val(), sources: data})
+ "for this track will be permanently removed."))) { .success(function () {
$http.put(endpoint + mediaId + '/publish', {csrf_token: jQuery("#csrf").val(), sources: data}) fetchSourceData();
.success(function () { });
fetchSourceData();
});
}
}; };
$scope.discard = function () { $scope.discard = function () {

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 * Enable/disable mail server authentication fields
*/ */
@ -208,5 +194,4 @@ $(document).ready(function() {
setEnableSystemEmailsListener(); setEnableSystemEmailsListener();
setTuneInSettingsReadonly(); setTuneInSettingsReadonly();
setTuneInSettingsListener(); setTuneInSettingsListener();
setSoundCloudSettingsListener();
}); });

View File

@ -429,31 +429,6 @@ function getFullCalendarEvents(start, end, callback) {
//$("span.fc-button > :button").addClass("btn btn-small"); //$("span.fc-button > :button").addClass("btn btn-small");
} }
function checkSCUploadStatus() {
var url = baseUrl + 'Library/get-upload-to-soundcloud-status/format/json',
id;
$("span[class*=progress]").each(function () {
id = $(this).parents("div.fc-event").data("event").id;
$.post(url, { format: "json", id: id, type: "show" }, function (json) {
if (json.sc_id > 0) {
$(".fc-show-instance-" + id)
.find(".progress")
.removeClass("progress")
.addClass("soundcloud");
}
else if (json.sc_id == "-3") {
$(".fc-show-instance-" + id)
.find(".progress")
.removeClass("progress")
.addClass("sc-error");
}
setTimeout(checkSCUploadStatus, 5000);
});
});
}
/** This function adds and removes the current /** This function adds and removes the current
* show icon * show icon
*/ */
@ -511,65 +486,6 @@ function addQtipsToIcons(ele, id) {
ready: true // Needed to make it show on first mouseover event ready: true // Needed to make it show on first mouseover event
} }
}); });
} else if ($(ele).hasClass("soundcloud")) {
$(ele).qtip({
content: {
text: $.i18n._("Retreiving data from the server..."),
ajax: {
url: baseUrl + "Library/get-upload-to-soundcloud-status",
type: "post",
data: ({ format: "json", id: id, type: "show" }),
success: function (json, status) {
this.set('content.text', $.i18n._("The soundcloud id for this file is: ") + json.sc_id);
}
}
},
position: {
adjust: {
resize: true,
method: "flip flip"
},
at: "right center",
my: "left top",
viewport: $(window)
},
style: {
classes: "ui-tooltip-dark file-md-long"
},
show: {
ready: true // Needed to make it show on first mouseover event
}
});
} else if ($(ele).hasClass("sc-error")) {
$(ele).qtip({
content: {
text: $.i18n._("Retreiving data from the server..."),
ajax: {
url: baseUrl + "Library/get-upload-to-soundcloud-status",
type: "post",
data: ({ format: "json", id: id, type: "show" }),
success: function (json, status) {
this.set('content.text', $.i18n._("There was error while uploading to soundcloud.") + "<br>" + $.i18n._("Error code: ") + json.error_code +
"<br>" + $.i18n._("Error msg: ") + json.error_msg + "<br>");
}
}
},
position: {
adjust: {
resize: true,
method: "flip flip"
},
at: "right center",
my: "left top",
viewport: $(window)
},
style: {
classes: "ui-tooltip-dark file-md-long"
},
show: {
ready: true // Needed to make it show on first mouseover event
}
});
} else if ($(ele).hasClass("show-empty")) { } else if ($(ele).hasClass("show-empty")) {
$(ele).qtip({ $(ele).qtip({
content: { content: {
@ -644,7 +560,6 @@ function alertShowErrorAndReload() {
$(document).ready(function () { $(document).ready(function () {
preloadEventFeed(); preloadEventFeed();
checkSCUploadStatus();
getCurrentShow(); getCurrentShow();
}); });

View File

@ -48,34 +48,6 @@ function confirmCancelRecordedShow(show_instance_id){
} }
} }
function checkCalendarSCUploadStatus(){
var url = baseUrl+'Library/get-upload-to-soundcloud-status',
span,
id;
function checkSCUploadStatusCallback(json) {
if (json.sc_id > 0) {
span.removeClass("progress").addClass("soundcloud");
}
else if (json.sc_id == "-3") {
span.removeClass("progress").addClass("sc-error");
}
}
function checkSCUploadStatusRequest() {
span = $(this);
id = span.parents("div.fc-event").data("event").id;
$.post(url, {format: "json", id: id, type:"show"}, checkSCUploadStatusCallback);
}
$("#schedule_calendar span.progress").each(checkSCUploadStatusRequest);
setTimeout(checkCalendarSCUploadStatus, 5000);
}
function findViewportDimensions() { function findViewportDimensions() {
var viewportwidth, var viewportwidth,
viewportheight; viewportheight;
@ -365,8 +337,6 @@ function alertShowErrorAndReload(){
$(document).ready(function() { $(document).ready(function() {
checkCalendarSCUploadStatus();
$.contextMenu({ $.contextMenu({
selector: 'div.fc-event', selector: 'div.fc-event',
trigger: "left", trigger: "left",

View File

@ -1,28 +0,0 @@
<?php
class Router {
/**
* Parse the URL query string and store the key->val pairs
* into an array, then redirect
*/
public function reroute() {
$params = array();
parse_str($_SERVER['QUERY_STRING'], $params);
$this->_redirect($params);
}
/**
* Redirect to the URL passed in the 'state' parameter
* when we're redirected here from SoundCloud
*
* @param $params array array of URL query parameters
*/
private function _redirect($params) {
$url = urldecode($params['state']);
header("Location: $url?" . $_SERVER['QUERY_STRING']);
}
}
(new Router())->reroute();

View File

@ -30,13 +30,6 @@ storage_backend=file
monit_user = guest monit_user = guest
monit_password = airtime monit_password = airtime
[soundcloud]
connection_retries = 3
time_between_retries = 60
soundcloud_client_id = 0
soundcloud_client_secret = 0
soundcloud_redirect_uri = http://soundcloud.example.org/redirect
[ldap] [ldap]
hostname = ldap.example.org hostname = ldap.example.org
binddn = 'uid=libretime,cn=sysaccounts,cn=etc,dc=int,dc=example,dc=org' binddn = 'uid=libretime,cn=sysaccounts,cn=etc,dc=int,dc=example,dc=org'

View File

@ -25,11 +25,4 @@ station_id = teststation
[monit] [monit]
monit_user = guest monit_user = guest
monit_password = airtime monit_password = airtime
[soundcloud]
connection_retries = 3
time_between_retries = 60
soundcloud_client_id = 0
soundcloud_client_secret = 0
soundcloud_redirect_uri = http://soundcloud.example.org/redirect

View File

@ -10,7 +10,6 @@
"propel/propel1": "1.7.0-stable", "propel/propel1": "1.7.0-stable",
"aws/aws-sdk-php": "2.7.9", "aws/aws-sdk-php": "2.7.9",
"raven/raven": "0.12.0", "raven/raven": "0.12.0",
"ise/php-soundcloud": "3.0.1",
"massivescale/celery-php": "2.0.*@dev", "massivescale/celery-php": "2.0.*@dev",
"simplepie/simplepie": "dev-master", "simplepie/simplepie": "dev-master",
"zf1s/zend-application": "^1.12", "zf1s/zend-application": "^1.12",

54
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "f77b688ef532e689ba85602a6faff987", "content-hash": "d0492e2014ec7e958f566adbf53e070b",
"packages": [ "packages": [
{ {
"name": "aws/aws-sdk-php", "name": "aws/aws-sdk-php",
@ -231,54 +231,6 @@
"abandoned": "guzzlehttp/guzzle", "abandoned": "guzzlehttp/guzzle",
"time": "2015-03-18T18:23:50+00:00" "time": "2015-03-18T18:23:50+00:00"
}, },
{
"name": "ise/php-soundcloud",
"version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/internalsystemerror/php-soundcloud.git",
"reference": "ac3ff2dce2a6e6d34636c58e66fd316d722c31df"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/internalsystemerror/php-soundcloud/zipball/ac3ff2dce2a6e6d34636c58e66fd316d722c31df",
"reference": "ac3ff2dce2a6e6d34636c58e66fd316d722c31df",
"shasum": ""
},
"require": {
"php": ">=5.3"
},
"type": "library",
"autoload": {
"psr-0": {
"Soundcloud\\": "src/",
"SoundcloudTest\\": "tests/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Anton Lindqvist",
"email": "anton@qvister.se",
"homepage": "http://qvister.se/",
"role": "developer"
},
{
"name": "Gary Lockett",
"email": "ise@garylockett.com",
"homepage": "http://www.garylockett.com/"
}
],
"description": "API Wrapper for SoundCloud written in PHP with support for authentication using OAuth 2.0 by Anton Lindqvist (mptre), composer support added by Gary Lockett (ise)",
"homepage": "https://github.com/internalsystemerror/php-soundcloud",
"keywords": [
"soundcloud"
],
"time": "2014-02-03T15:49:00+00:00"
},
{ {
"name": "james-heinrich/getid3", "name": "james-heinrich/getid3",
"version": "dev-master", "version": "dev-master",
@ -562,12 +514,12 @@
"version": "v1.0.3", "version": "v1.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nrk/predis.git", "url": "https://github.com/predis/predis.git",
"reference": "84060b9034d756b4d79641667d7f9efe1aeb8e04" "reference": "84060b9034d756b4d79641667d7f9efe1aeb8e04"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nrk/predis/zipball/84060b9034d756b4d79641667d7f9efe1aeb8e04", "url": "https://api.github.com/repos/predis/predis/zipball/84060b9034d756b4d79641667d7f9efe1aeb8e04",
"reference": "84060b9034d756b4d79641667d7f9efe1aeb8e04", "reference": "84060b9034d756b4d79641667d7f9efe1aeb8e04",
"shasum": "" "shasum": ""
}, },

View File

@ -12,7 +12,7 @@ Optionally, you may wish to edit the file */etc/airtime/airtime.conf* to set the
sudo nano /etc/airtime/airtime.conf sudo nano /etc/airtime/airtime.conf
You can also set options for RabbitMQ messaging, the LibreTime server and SoundCloud uploads in this file, although you should not normally need to adjust the defaults unless you are running a large LibreTime system distributed across multiple servers. To run the LibreTime server in demo mode, which changes the greeting on the login page and prevents user accounts from being created or modified, set the value of *demo* to 1. You can also set options for RabbitMQ messaging and the LibreTime server in this file, although you should not normally need to adjust the defaults unless you are running a large LibreTime system distributed across multiple servers. To run the LibreTime server in demo mode, which changes the greeting on the login page and prevents user accounts from being created or modified, set the value of *demo* to 1.
[database] [database]
host = localhost host = localhost
@ -40,10 +40,6 @@ You can also set options for RabbitMQ messaging, the LibreTime server and SoundC
monit_user = guest monit_user = guest
monit_password = airtime monit_password = airtime
[soundcloud]
connection_retries = 3
time_between_retries = 60
[demo] [demo]
demo = 0 demo = 0

View File

@ -100,11 +100,6 @@ paths:
"subject": null, "subject": null,
"contributor": null, "contributor": null,
"language": null, "language": null,
"soundcloud_id": null,
"soundcloud_error_code": null,
"soundcloud_error_msg": null,
"soundcloud_link_to_file": null,
"soundcloud_upload_time": null,
"replay_gain": "-5.58", "replay_gain": "-5.58",
"owner_id": 1, "owner_id": 1,
"cuein": "00:00:00", "cuein": "00:00:00",
@ -179,11 +174,6 @@ paths:
"subject": null, "subject": null,
"contributor": null, "contributor": null,
"language": null, "language": null,
"soundcloud_id": null,
"soundcloud_error_code": null,
"soundcloud_error_msg": null,
"soundcloud_link_to_file": null,
"soundcloud_upload_time": null,
"replay_gain": "-5.07", "replay_gain": "-5.07",
"owner_id": 1, "owner_id": 1,
"cuein": "00:00:00", "cuein": "00:00:00",
@ -258,11 +248,6 @@ paths:
"subject": null, "subject": null,
"contributor": null, "contributor": null,
"language": null, "language": null,
"soundcloud_id": null,
"soundcloud_error_code": null,
"soundcloud_error_msg": null,
"soundcloud_link_to_file": null,
"soundcloud_upload_time": null,
"replay_gain": "-8.57", "replay_gain": "-8.57",
"owner_id": 1, "owner_id": 1,
"cuein": "00:00:00", "cuein": "00:00:00",
@ -414,11 +399,6 @@ paths:
"subject": null, "subject": null,
"contributor": null, "contributor": null,
"language": null, "language": null,
"soundcloud_id": null,
"soundcloud_error_code": null,
"soundcloud_error_msg": null,
"soundcloud_link_to_file": null,
"soundcloud_upload_time": null,
"replay_gain": "-8.57", "replay_gain": "-8.57",
"owner_id": 1, "owner_id": 1,
"cuein": "00:00:00", "cuein": "00:00:00",
@ -492,11 +472,6 @@ paths:
"subject": null, "subject": null,
"contributor": null, "contributor": null,
"language": null, "language": null,
"soundcloud_id": null,
"soundcloud_error_code": null,
"soundcloud_error_msg": null,
"soundcloud_link_to_file": null,
"soundcloud_upload_time": null,
"replay_gain": "-1.2", "replay_gain": "-1.2",
"owner_id": 1, "owner_id": 1,
"cuein": "00:00:00", "cuein": "00:00:00",
@ -807,8 +782,7 @@ paths:
"instance_description": "", "instance_description": "",
"created": "2019-10-21 17:20:22", "created": "2019-10-21 17:20:22",
"last_scheduled": "2019-10-21 17:20:50", "last_scheduled": "2019-10-21 17:20:50",
"time_filled": "01:14:39.265872", "time_filled": "01:14:39.265872"
"soundcloud_id": null
} }
] ]
/show-logo: /show-logo:

View File

@ -29,7 +29,6 @@ CELERY_RESULT_PERSISTENT = True # Persist through a broker restart
CELERY_TASK_RESULT_EXPIRES = 900 # Expire task results after 15 minutes CELERY_TASK_RESULT_EXPIRES = 900 # Expire task results after 15 minutes
CELERY_RESULT_EXCHANGE = "celeryresults" # Default exchange - needed due to php-celery CELERY_RESULT_EXCHANGE = "celeryresults" # Default exchange - needed due to php-celery
CELERY_QUEUES = ( CELERY_QUEUES = (
Queue("soundcloud", exchange=Exchange("soundcloud"), routing_key="soundcloud"),
Queue("podcast", exchange=Exchange("podcast"), routing_key="podcast"), Queue("podcast", exchange=Exchange("podcast"), routing_key="podcast"),
Queue(exchange=Exchange("celeryresults"), auto_delete=True), Queue(exchange=Exchange("celeryresults"), auto_delete=True),
) )

View File

@ -5,7 +5,6 @@ install_aliases()
import os import os
import json import json
import requests import requests
import soundcloud
import cgi import cgi
import posixpath import posixpath
import shutil import shutil
@ -23,134 +22,6 @@ celery = Celery()
logger = get_task_logger(__name__) logger = get_task_logger(__name__)
@celery.task(name="soundcloud-upload", acks_late=True)
def soundcloud_upload(data, token, file_path):
"""
Upload a file to SoundCloud
:param data: associative array containing SoundCloud metadata
:param token: OAuth2 client access token
:param file_path: path to the file being uploaded
:return: JSON formatted string of the SoundCloud response object
:rtype: string
"""
client = soundcloud.Client(access_token=token)
# Open the file with requests if it's a cloud file
data["asset_data"] = (
open(file_path, "rb")
if os.path.isfile(file_path)
else requests.get(file_path).content
)
try:
logger.info("Uploading track: {0}".format(data))
track = client.post("/tracks", track=data)
except Exception as e:
logger.info("Error uploading track {title}: {0}".format(e.message, **data))
raise e
data["asset_data"].close()
return json.dumps(track.fields())
@celery.task(name="soundcloud-download", acks_late=True)
def soundcloud_download(token, callback_url, api_key, track_id):
"""
Download a file from SoundCloud
:param token: OAuth2 client access token
:param callback_url: callback URL to send the downloaded file to
:param api_key: API key for callback authentication
:param track_id: SoundCloud track identifier
:return: JSON formatted string of file identifiers for the downloaded tracks
:rtype: string
"""
client = soundcloud.Client(access_token=token)
obj = {}
try:
track = client.get("/tracks/%s" % track_id)
obj.update(track.fields())
if track.downloadable:
re = None
with closing(
requests.get(
"%s?oauth_token=%s" % (track.download_url, client.access_token),
verify=True,
stream=True,
)
) as r:
filename = get_filename(r)
re = requests.post(
callback_url,
files={"file": (filename, r.content)},
auth=requests.auth.HTTPBasicAuth(api_key, ""),
)
re.raise_for_status()
try:
response = re.content.decode()
except (UnicodeDecodeError, AttributeError):
response = re.content
f = json.loads(
response
) # Read the response from the media API to get the file id
obj["fileid"] = f["id"]
else:
# manually update the task state
self.update_state(
state=states.FAILURE,
meta="Track %s is not flagged as downloadable!" % track.title,
)
# ignore the task so no other state is recorded
raise Ignore()
except Exception as e:
logger.info("Error during file download: {0}".format(e.message))
raise e
return json.dumps(obj)
@celery.task(name="soundcloud-update", acks_late=True)
def soundcloud_update(data, token, track_id):
"""
Update a file on SoundCloud
:param data: associative array containing SoundCloud metadata
:param token: OAuth2 client access token
:param track_id: SoundCloud ID of the track to be updated
:return: JSON formatted string of the SoundCloud response object
:rtype: string
"""
client = soundcloud.Client(access_token=token)
try:
logger.info("Updating track {title}".format(**data))
track = client.put("/tracks/%s" % track_id, track=data)
except Exception as e:
logger.info("Error updating track {title}: {0}".format(e.message, **data))
raise e
return json.dumps(track.fields())
@celery.task(name="soundcloud-delete", acks_late=True)
def soundcloud_delete(token, track_id):
"""
Delete a file from SoundCloud
:param token: OAuth2 client access token
:param track_id: SoundCloud track identifier
:return: JSON formatted string of the SoundCloud response object
:rtype: string
"""
client = soundcloud.Client(access_token=token)
try:
logger.info("Deleting track with ID {0}".format(track_id))
track = client.delete("/tracks/%s" % track_id)
except Exception as e:
logger.info("Error deleting track!")
raise e
return json.dumps(track.fields())
@celery.task(name="podcast-download", acks_late=True) @celery.task(name="podcast-download", acks_late=True)
def podcast_download( def podcast_download(
id, url, callback_url, api_key, podcast_name, album_override, track_title id, url, callback_url, api_key, podcast_name, album_override, track_title

View File

@ -48,7 +48,7 @@ setup(
author_email="duncan.sommerville@sourcefabric.org", author_email="duncan.sommerville@sourcefabric.org",
license="MIT", license="MIT",
packages=["airtime-celery"], packages=["airtime-celery"],
install_requires=["soundcloud", "celery==4.4.7", "kombu==4.6.10", "configobj"], install_requires=["celery==4.4.7", "kombu==4.6.10", "configobj"],
zip_safe=False, zip_safe=False,
data_files=data_files, data_files=data_files,
) )