diff options
-rw-r--r-- | src/playlist/SoundCloudPlaylistPlugin.cxx | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/playlist/SoundCloudPlaylistPlugin.cxx b/src/playlist/SoundCloudPlaylistPlugin.cxx index 68262fccb..716e2d6fb 100644 --- a/src/playlist/SoundCloudPlaylistPlugin.cxx +++ b/src/playlist/SoundCloudPlaylistPlugin.cxx @@ -322,18 +322,10 @@ soundcloud_parse_json(const char *url, yajl_handle hand, static SongEnumerator * soundcloud_open_uri(const char *uri, Mutex &mutex, Cond &cond) { - char *s = g_strdup(uri); - char *scheme = s; + assert(memcmp(uri, "soundcloud://", 13) == 0); + char *const s = g_strdup(uri + 13); char *p = s; - for (; *p; p++) { - if (*p == ':' && *(p+1) == '/' && *(p+2) == '/') { - *p = 0; - p += 3; - break; - } - } - char *arg = p; for (; *p; p++) { if (*p == '/') { @@ -345,14 +337,6 @@ soundcloud_open_uri(const char *uri, Mutex &mutex, Cond &cond) char *rest = p; - if (strcmp(scheme, "soundcloud") != 0) { - FormatWarning(soundcloud_domain, - "incompatible scheme for soundcloud plugin: %s", - scheme); - g_free(s); - return nullptr; - } - char *u = nullptr; if (strcmp(arg, "track") == 0) { u = g_strconcat("https://api.soundcloud.com/tracks/", |