CC-2110 : Soundcloud file metadata

uploading show description, show name in filename, tags ready to be uploaded for creator need to figure out what to upload.
This commit is contained in:
naomiaro 2011-03-28 12:10:51 -04:00
parent bb0f610fca
commit df8b9af8f6
4 changed files with 26 additions and 22 deletions

View file

@ -28,14 +28,18 @@ class ATSoundcloud {
return $token;
}
public function uploadTrack($filepath, $filename)
public function uploadTrack($filepath, $filename, $description, $tags=array())
{
if($this->getToken())
{
$tags = join(" ", $tags);
$track_data = array(
'track[sharing]' => 'private',
'track[title]' => $filename,
'track[asset_data]' => '@' . $filepath
'track[asset_data]' => '@' . $filepath,
'track[tag_list]' => $tags,
'track[description]' => $description
);
try {
@ -46,7 +50,6 @@ class ATSoundcloud {
}
catch (Services_Soundcloud_Invalid_Http_Response_Code_Exception $e) {
echo $e->getMessage();
echo var_dump($track_data);
}
}
}