From 61cb5df842cc3d5477e18b92ff7157110759ea3b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 6 Nov 2009 01:07:42 +0100 Subject: [PATCH] playlist_queue: moved code to playlist_open_remote_into_queue() --- src/playlist_queue.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/playlist_queue.c b/src/playlist_queue.c index f31eb9f42..f392ce96a 100644 --- a/src/playlist_queue.c +++ b/src/playlist_queue.c @@ -59,17 +59,15 @@ playlist_load_into_queue(struct playlist_provider *source, return PLAYLIST_RESULT_SUCCESS; } -enum playlist_result -playlist_open_into_queue(const char *uri, struct playlist *dest) +static enum playlist_result +playlist_open_remote_into_queue(const char *uri, struct playlist *dest) { struct playlist_provider *playlist; bool stream = false; struct input_stream is; enum playlist_result result; - if (!uri_has_scheme(uri)) - /* don't allow local playlist files for now */ - return PLAYLIST_RESULT_NO_SUCH_LIST; + assert(uri_has_scheme(uri)); playlist = playlist_list_open_uri(uri); if (playlist == NULL) { @@ -92,3 +90,12 @@ playlist_open_into_queue(const char *uri, struct playlist *dest) return result; } + +enum playlist_result +playlist_open_into_queue(const char *uri, struct playlist *dest) +{ + if (uri_has_scheme(uri)) + return playlist_open_remote_into_queue(uri, dest); + else + return PLAYLIST_RESULT_NO_SUCH_LIST; +}