playlist_queue: moved code to playlist_open_remote_into_queue()
This commit is contained in:
parent
7e66f34154
commit
61cb5df842
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user