Cleaned up soundcloud

This commit is contained in:
Rudi Grinberg 2012-10-26 18:45:27 -04:00
parent faf4052fda
commit d6a4f2f713

View file

@ -26,7 +26,10 @@ class Application_Model_Soundcloud
public function uploadTrack($filepath, $filename, $description, public function uploadTrack($filepath, $filename, $description,
$tags=array(), $release=null, $genre=null) $tags=array(), $release=null, $genre=null)
{ {
if ($this->getToken()) {
if (!$this->getToken()) {
throw new NoSoundCloundToken();
}
if (count($tags)) { if (count($tags)) {
$tags = join(" ", $tags); $tags = join(" ", $tags);
$tags = $tags." ".Application_Model_Preference::GetSoundCloudTags(); $tags = $tags." ".Application_Model_Preference::GetSoundCloudTags();
@ -82,9 +85,7 @@ class Application_Model_Soundcloud
); );
return $response; return $response;
} else {
throw new NoSoundCloundToken();
}
} }
public static function uploadSoundcloud($id) public static function uploadSoundcloud($id)