Add fields to SoundCloud upload
This commit is contained in:
parent
f26559c0c6
commit
e44e0de534
2 changed files with 8 additions and 1 deletions
|
@ -73,6 +73,9 @@ class Application_Model_StoredFile
|
||||||
return $this->_file->getDbFtype();
|
return $this->_file->getDbFtype();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return CcFiles
|
||||||
|
*/
|
||||||
public function getPropelOrm()
|
public function getPropelOrm()
|
||||||
{
|
{
|
||||||
return $this->_file;
|
return $this->_file;
|
||||||
|
|
|
@ -68,8 +68,12 @@ class SoundcloudService extends ThirdPartyCeleryService implements OAuth2 {
|
||||||
* @return array the track array to send to SoundCloud
|
* @return array the track array to send to SoundCloud
|
||||||
*/
|
*/
|
||||||
protected function _getUploadData($file) {
|
protected function _getUploadData($file) {
|
||||||
|
$file = $file->getPropelOrm();
|
||||||
|
// TODO: Move this into a proper serializer
|
||||||
$trackArray = array(
|
$trackArray = array(
|
||||||
'title' => $file->getName(),
|
'title' => $file->getDbName(),
|
||||||
|
'genre' => $file->getDbGenre(),
|
||||||
|
'bpm' => $file->getDbBpm(),
|
||||||
);
|
);
|
||||||
foreach (self::$_SOUNDCLOUD_PREF_FUNCTIONS as $func => $param) {
|
foreach (self::$_SOUNDCLOUD_PREF_FUNCTIONS as $func => $param) {
|
||||||
$val = Application_Model_Preference::$func();
|
$val = Application_Model_Preference::$func();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue