diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/playlist.c | 9 | ||||
-rw-r--r-- | common/playlist.h | 1 |
2 files changed, 10 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) diff --git a/common/playlist.h b/common/playlist.h index c55a3a21c8..73227f071c 100644 --- a/common/playlist.h +++ b/common/playlist.h @@ -74,6 +74,7 @@ void playlist_shuffle(struct playlist *pl); struct playlist_entry *playlist_get_next(struct playlist *pl, int direction); void playlist_add_base_path(struct playlist *pl, bstr base_path); void playlist_transfer_entries(struct playlist *pl, struct playlist *source_pl); +void playlist_append_entries(struct playlist *pl, struct playlist *source_pl); int playlist_entry_to_index(struct playlist *pl, struct playlist_entry *e); int playlist_entry_count(struct playlist *pl); |