summaryrefslogtreecommitdiffstats
path: root/common/playlist.c
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@ghedini.me>2014-07-24 19:30:24 +0200
committerAlessandro Ghedini <alessandro@ghedini.me>2014-07-26 11:55:02 +0200
commitd50be0a2a61a247faa10e18d9881c7837d72b3cd (patch)
treecaff05851670d558834aa7823fe2d4e85f243bd1 /common/playlist.c
parent2d8e26bb72d8b1645f98979f2715e1a12e9d1ab5 (diff)
downloadmpv-d50be0a2a61a247faa10e18d9881c7837d72b3cd.tar.bz2
mpv-d50be0a2a61a247faa10e18d9881c7837d72b3cd.tar.xz
command: append entries to the end of the playlist with loadlist append
Currently entries are added after the current playlist element. This is kinda confusing, more so given that "loadfile append" appends at the end of the playlist.
Diffstat (limited to 'common/playlist.c')
-rw-r--r--common/playlist.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/playlist.c b/common/playlist.c
index e33fbd36c8..4df3396b04 100644
--- a/common/playlist.c
+++ b/common/playlist.c
@@ -215,6 +215,15 @@ void playlist_transfer_entries(struct playlist *pl, struct playlist *source_pl)
}
}
+void playlist_append_entries(struct playlist *pl, struct playlist *source_pl)
+{
+ while (source_pl->first) {
+ struct playlist_entry *e = source_pl->first;
+ playlist_unlink(source_pl, e);
+ playlist_add(pl, e);
+ }
+}
+
// Return number of entries between list start and e.
// Return -1 if e is not on the list, or if e is NULL.
int playlist_entry_to_index(struct playlist *pl, struct playlist_entry *e)