From 5f664d78e6e9bd5809dc7d0f12c4099e76582cb3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 27 Jun 2013 18:21:07 +0200 Subject: core: add libquvi 0.9 support This adds support for libquvi 0.9.x, and these features: - start time (part of youtube URL) - youtube subtitles - alternative source switching ('l' and 'L' keys) - youtube playlists Note that libquvi 0.9 is still in development. Although this seems to be API stable now, it looks like there will be a 1.0 release, which is supposed to be the next stable release and the actual successor of libquvi 0.4.x. --- core/playlist.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'core/playlist.c') diff --git a/core/playlist.c b/core/playlist.c index 5456931afa..7188392bc6 100644 --- a/core/playlist.c +++ b/core/playlist.c @@ -180,13 +180,19 @@ void playlist_add_base_path(struct playlist *pl, bstr base_path) } } -// Move all entries from source_pl to pl, appending them at the end of pl. -// source_pl will be empty, and all entries have changed ownership to pl. +// Move all entries from source_pl to pl, appending them after the current entry +// of pl. source_pl will be empty, and all entries have changed ownership to pl. void playlist_transfer_entries(struct playlist *pl, struct playlist *source_pl) { + struct playlist_entry *add_after = pl->current; + if (pl->current && pl->current_was_replaced) + add_after = pl->current->next; + if (!add_after) + add_after = pl->last; + while (source_pl->first) { struct playlist_entry *e = source_pl->first; playlist_unlink(source_pl, e); - playlist_add(pl, e); + playlist_insert(pl, add_after, e); } } -- cgit v1.2.3