playlist_queue: moved code to playlist_open_remote_into_queue()

This commit is contained in:
Max Kellermann 2009-11-06 01:07:42 +01:00
parent 7e66f34154
commit 61cb5df842

View File

@ -59,17 +59,15 @@ playlist_load_into_queue(struct playlist_provider *source,
return PLAYLIST_RESULT_SUCCESS; return PLAYLIST_RESULT_SUCCESS;
} }
enum playlist_result static enum playlist_result
playlist_open_into_queue(const char *uri, struct playlist *dest) playlist_open_remote_into_queue(const char *uri, struct playlist *dest)
{ {
struct playlist_provider *playlist; struct playlist_provider *playlist;
bool stream = false; bool stream = false;
struct input_stream is; struct input_stream is;
enum playlist_result result; enum playlist_result result;
if (!uri_has_scheme(uri)) assert(uri_has_scheme(uri));
/* don't allow local playlist files for now */
return PLAYLIST_RESULT_NO_SUCH_LIST;
playlist = playlist_list_open_uri(uri); playlist = playlist_list_open_uri(uri);
if (playlist == NULL) { if (playlist == NULL) {
@ -92,3 +90,12 @@ playlist_open_into_queue(const char *uri, struct playlist *dest)
return result; 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;
}