diff --git a/airtime_mvc/application/services/SoundcloudService.php b/airtime_mvc/application/services/SoundcloudService.php index 16be037bc..53daf9fc7 100644 --- a/airtime_mvc/application/services/SoundcloudService.php +++ b/airtime_mvc/application/services/SoundcloudService.php @@ -66,6 +66,18 @@ class SoundcloudService extends ThirdPartyCeleryService implements OAuth2 { } } + /** + * Given a SoundCloud track identifier, download a track from SoundCloud. + * + * If no track identifier is given, download all tracks for the currently + * authenticated SoundCloud user. + * + * @param int|null $trackId a SoundCloud track identifier + */ + public function download($trackId = null) { + parent::download($trackId); + } + /** * Build a parameter array for the track being uploaded to SoundCloud * diff --git a/airtime_mvc/application/services/ThirdPartyCeleryService.php b/airtime_mvc/application/services/ThirdPartyCeleryService.php index 78b0a09ce..2a7b12606 100644 --- a/airtime_mvc/application/services/ThirdPartyCeleryService.php +++ b/airtime_mvc/application/services/ThirdPartyCeleryService.php @@ -47,18 +47,15 @@ abstract class ThirdPartyCeleryService extends ThirdPartyService { } /** - * Given a SoundCloud track identifier, download a track from SoundCloud. + * Given a track identifier, download a track from a third-party service. * - * If no track identifier is given, download all tracks for the currently - * authenticated SoundCloud user. - * - * @param int|null $trackId a SoundCloud track identifier + * @param int|null $trackId a track identifier */ - public function download($trackId = null) { + public function download($trackId) { $namespace = new Zend_Session_Namespace('csrf_namespace'); $csrfToken = $namespace->authtoken; $data = array( - 'callback_url' => 'http' . (empty($_SERVER['HTTPS']) ? '' : 's') . '://' . $_SERVER['HTTP_HOST'] . '/media/post>csrf_token=' . $csrfToken, + 'callback_url' => 'http' . (empty($_SERVER['HTTPS']) ? '' : 's') . '://' . $_SERVER['HTTP_HOST'] . '/media/post?csrf_token=' . $csrfToken, 'token' => $this->_accessToken, 'track_id' => $trackId );