aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/command.c2
-rw-r--r--src/playlist_save.c6
-rw-r--r--src/playlist_save.h6
3 files changed, 13 insertions, 1 deletions
diff --git a/src/command.c b/src/command.c
index 5ff93307a..a8a72b670 100644
--- a/src/command.c
+++ b/src/command.c
@@ -663,7 +663,7 @@ handle_save(struct client *client,
{
enum playlist_result result;
- result = spl_save_queue(argv[1], playlist_get_queue(&g_playlist));
+ result = spl_save_playlist(argv[1], &g_playlist);
return print_playlist_result(client, result);
}
diff --git a/src/playlist_save.c b/src/playlist_save.c
index f1634eb56..65cc75e2f 100644
--- a/src/playlist_save.c
+++ b/src/playlist_save.c
@@ -98,6 +98,12 @@ spl_save_queue(const char *name_utf8, const struct queue *queue)
}
enum playlist_result
+spl_save_playlist(const char *name_utf8, const struct playlist *playlist)
+{
+ return spl_save_queue(name_utf8, &playlist->queue);
+}
+
+enum playlist_result
playlist_load_spl(struct playlist *playlist, const char *name_utf8)
{
GPtrArray *list;
diff --git a/src/playlist_save.h b/src/playlist_save.h
index 084ea16ec..20b015c9a 100644
--- a/src/playlist_save.h
+++ b/src/playlist_save.h
@@ -38,6 +38,12 @@ enum playlist_result
spl_save_queue(const char *name_utf8, const struct queue *queue);
/**
+ * Saves a playlist object into a stored playlist file.
+ */
+enum playlist_result
+spl_save_playlist(const char *name_utf8, const struct playlist *playlist);
+
+/**
* Loads a stored playlist file, and append all songs to the global
* playlist.
*/