CC-2110 : Soundcloud file metadata

added text area to preferences to allow for additional soundcloud tags.
This commit is contained in:
Naomi 2011-03-28 15:39:01 -04:00
parent df8b9af8f6
commit c0e8152077
4 changed files with 31 additions and 2 deletions

View file

@ -124,5 +124,13 @@ class Application_Model_Preference
return Application_Model_Preference::GetValue("soundcloud_password");
}
public static function SetSoundCloudTags($tags) {
Application_Model_Preference::SetValue("soundcloud_tags", $tags);
}
public static function GetSoundCloudTags() {
return Application_Model_Preference::GetValue("soundcloud_tags");
}
}

View file

@ -32,7 +32,13 @@ class ATSoundcloud {
{
if($this->getToken())
{
$tags = join(" ", $tags);
if(count($tags)) {
$tags = join(" ", $tags);
$tags = $tags." ".Application_Model_Preference::GetSoundCloudTags();
}
else {
$tags = Application_Model_Preference::GetSoundCloudTags();
}
$track_data = array(
'track[sharing]' => 'private',
@ -47,11 +53,17 @@ class ATSoundcloud {
$this->_soundcloud->post('tracks', $track_data),
true
);
echo var_dump($response);
}
catch (Services_Soundcloud_Invalid_Http_Response_Code_Exception $e) {
echo $e->getMessage();
}
}
else
{
echo "could not get soundcloud token";
}
}
}