CC-2993: Playlist Builder: add "View on SoundCloud" option on the menu
- fixed - extra fix: handles the case when username or password is empty
This commit is contained in:
parent
8b2a23b88a
commit
f160ded6bc
10 changed files with 125 additions and 24 deletions
|
@ -17,11 +17,6 @@ class Application_Model_Soundcloud {
|
|||
$username = Application_Model_Preference::GetSoundCloudUser();
|
||||
$password = Application_Model_Preference::GetSoundCloudPassword();
|
||||
|
||||
if($username === "" || $password === "")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$token = $this->_soundcloud->accessTokenResourceOwner($username, $password);
|
||||
|
||||
return $token;
|
||||
|
@ -82,13 +77,13 @@ class Application_Model_Soundcloud {
|
|||
if ($license != "") {
|
||||
$track_data['track[license]'] = $license;
|
||||
}
|
||||
|
||||
|
||||
$response = json_decode(
|
||||
$this->_soundcloud->post('tracks', $track_data),
|
||||
true
|
||||
);
|
||||
|
||||
return $response["id"];
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue