aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-10-13 18:53:33 +0200
committerMax Kellermann <max@duempel.org>2009-10-13 18:53:33 +0200
commita93ffdd1bed1885740f0a28bc649a9db9a7969e4 (patch)
tree855c12d75f8bc7df21ff7438594de9ae1657ac13 /src/command.c
parent319149254d220861c76922be1f2fa8d00722da92 (diff)
downloadmpd-a93ffdd1bed1885740f0a28bc649a9db9a7969e4.tar.gz
mpd-a93ffdd1bed1885740f0a28bc649a9db9a7969e4.tar.xz
mpd-a93ffdd1bed1885740f0a28bc649a9db9a7969e4.zip
command: "load" supports remote playlists (m3u, xspf, lastfm://)
This patch integrates the playlist plugin API to the MPD core. We'll be able to do much more in the future with that API, that's just the beginning.
Diffstat (limited to '')
-rw-r--r--src/command.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/command.c b/src/command.c
index 1829f360a..9a34093b6 100644
--- a/src/command.c
+++ b/src/command.c
@@ -22,6 +22,7 @@
#include "playlist.h"
#include "playlist_print.h"
#include "playlist_save.h"
+#include "playlist_queue.h"
#include "queue_print.h"
#include "ls.h"
#include "uri.h"
@@ -707,6 +708,10 @@ handle_load(struct client *client, G_GNUC_UNUSED int argc, char *argv[])
{
enum playlist_result result;
+ result = playlist_open_into_queue(argv[1], &g_playlist);
+ if (result != PLAYLIST_RESULT_NO_SUCH_LIST)
+ return result;
+
result = playlist_load_spl(&g_playlist, argv[1]);
return print_playlist_result(client, result);
}