CC-2110 : Soundcloud file metadata

added show genre column, this is used instead of soundcloud default genre if set.
This commit is contained in:
naomiaro 2011-04-02 17:09:37 -04:00
parent 7be60fbf84
commit b97e79773b
12 changed files with 174 additions and 38 deletions

View file

@ -28,7 +28,7 @@ class ATSoundcloud {
return $token;
}
public function uploadTrack($filepath, $filename, $description, $tags=array(), $release=null)
public function uploadTrack($filepath, $filename, $description, $tags=array(), $release=null, $genre=null)
{
if($this->getToken())
{
@ -61,11 +61,16 @@ class ATSoundcloud {
$track_data['track[release_month]'] = $release[1];
$track_data['track[release_day]'] = $release[2];
}
$genre = Application_Model_Preference::GetSoundCloudGenre();
if ($genre != "") {
if (isset($genre) && $genre != "") {
$track_data['track[genre]'] = $genre;
}
else {
$default_genre = Application_Model_Preference::GetSoundCloudTrackType();
if ($genre != "") {
$track_data['track[genre]'] = $default_genre;
}
}
$track_type = Application_Model_Preference::GetSoundCloudTrackType();
if ($track_type != "") {