diff options
author | James McGlashan (DarkFox) <mpd@darkfox.id.au> | 2014-01-02 23:50:22 +1100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-04 13:36:24 +0100 |
commit | 1ee3df6976750c9c6e5869a99c1bca6dcd74bf50 (patch) | |
tree | 160bdc19de998dddb22a54e87f92fafa509b48cc /src/playlist/SoundCloudPlaylistPlugin.cxx | |
parent | d4dea53ae9078bb1b86ee5d364f1b05a6133400b (diff) | |
download | mpd-1ee3df6976750c9c6e5869a99c1bca6dcd74bf50.tar.gz mpd-1ee3df6976750c9c6e5869a99c1bca6dcd74bf50.tar.xz mpd-1ee3df6976750c9c6e5869a99c1bca6dcd74bf50.zip |
Added user and search paramaters for SoundCloud plugin
Diffstat (limited to 'src/playlist/SoundCloudPlaylistPlugin.cxx')
-rw-r--r-- | src/playlist/SoundCloudPlaylistPlugin.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/playlist/SoundCloudPlaylistPlugin.cxx b/src/playlist/SoundCloudPlaylistPlugin.cxx index 63cf821f6..07ac52c04 100644 --- a/src/playlist/SoundCloudPlaylistPlugin.cxx +++ b/src/playlist/SoundCloudPlaylistPlugin.cxx @@ -363,6 +363,14 @@ soundcloud_open_uri(const char *uri, Mutex &mutex, Cond &cond) u = g_strconcat("https://api.soundcloud.com/playlists/", rest, ".json?client_id=", soundcloud_config.apikey.c_str(), nullptr); + } else if (strcmp(arg, "user") == 0) { + u = g_strconcat("https://api.soundcloud.com/users/", + rest, "/tracks.json?client_id=", + soundcloud_config.apikey.c_str(), nullptr); + } else if (strcmp(arg, "search") == 0) { + u = g_strconcat("https://api.soundcloud.com/tracks.json?q=", + rest, "&client_id=", + soundcloud_config.apikey.c_str(), nullptr); } else if (strcmp(arg, "url") == 0) { /* Translate to soundcloud resolver call. libcurl will automatically follow the redirect to the right resource. */ |