aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist_queue.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-06 01:07:42 +0100
committerMax Kellermann <max@duempel.org>2009-11-06 01:07:42 +0100
commit61cb5df842cc3d5477e18b92ff7157110759ea3b (patch)
treee04726140685465499f74851f08efc616df1f088 /src/playlist_queue.c
parent7e66f341544488c839c05e5c1589c8b8ca959334 (diff)
downloadmpd-61cb5df842cc3d5477e18b92ff7157110759ea3b.tar.gz
mpd-61cb5df842cc3d5477e18b92ff7157110759ea3b.tar.xz
mpd-61cb5df842cc3d5477e18b92ff7157110759ea3b.zip
playlist_queue: moved code to playlist_open_remote_into_queue()
Diffstat (limited to 'src/playlist_queue.c')
-rw-r--r--src/playlist_queue.c17
1 files 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;
+}