aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist_list.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/playlist_list.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/playlist_list.c b/src/playlist_list.c
index 2c6237ed4..d6359463e 100644
--- a/src/playlist_list.c
+++ b/src/playlist_list.c
@@ -104,6 +104,18 @@ playlist_list_global_finish(void)
playlist_plugin_finish(playlist_plugins[i]);
}
+/* g_uri_parse_scheme() was introduced in GLib 2.16 */
+#if !GLIB_CHECK_VERSION(2,16,0)
+static char *
+g_uri_parse_scheme(const char *uri)
+{
+ const char *end = strstr(uri, "://");
+ if (end == NULL)
+ return NULL;
+ return g_strndup(uri, end - uri);
+}
+#endif
+
struct playlist_provider *
playlist_list_open_uri(const char *uri)
{