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.
This commit is contained in:
Max Kellermann
2009-10-13 18:53:33 +02:00
parent 319149254d
commit a93ffdd1be
5 changed files with 150 additions and 0 deletions

View File

@@ -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);
}