aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist/SoundCloudPlaylistPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-11-28 18:48:35 +0100
committerMax Kellermann <max@duempel.org>2013-11-28 18:48:35 +0100
commitaf4133e3c92c78cc19ff14b876be6afcab1db091 (patch)
treeda38387995bde630b20f81a717862ae21d19bb48 /src/playlist/SoundCloudPlaylistPlugin.cxx
parenta788b7e747bc21b9aadee45dd028fa6198af794e (diff)
downloadmpd-af4133e3c92c78cc19ff14b876be6afcab1db091.tar.gz
mpd-af4133e3c92c78cc19ff14b876be6afcab1db091.tar.xz
mpd-af4133e3c92c78cc19ff14b876be6afcab1db091.zip
Util/StringUtil: add StringStartsWith()
Replaces GLib's g_str_has_prefix().
Diffstat (limited to 'src/playlist/SoundCloudPlaylistPlugin.cxx')
-rw-r--r--src/playlist/SoundCloudPlaylistPlugin.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/playlist/SoundCloudPlaylistPlugin.cxx b/src/playlist/SoundCloudPlaylistPlugin.cxx
index f6797b14d..0d4b39948 100644
--- a/src/playlist/SoundCloudPlaylistPlugin.cxx
+++ b/src/playlist/SoundCloudPlaylistPlugin.cxx
@@ -25,6 +25,7 @@
#include "InputStream.hxx"
#include "Song.hxx"
#include "tag/Tag.hxx"
+#include "util/StringUtil.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "Log.hxx"
@@ -65,9 +66,9 @@ static char *
soundcloud_resolve(const char* uri) {
char *u, *ru;
- if (g_str_has_prefix(uri, "http://")) {
+ if (StringStartsWith(uri, "http://")) {
u = g_strdup(uri);
- } else if (g_str_has_prefix(uri, "soundcloud.com")) {
+ } else if (StringStartsWith(uri, "soundcloud.com")) {
u = g_strconcat("http://", uri, nullptr);
} else {
/* assume it's just a path on soundcloud.com */