From 50309d3a55124a9804d75ab5a37a4e6beb075b68 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Filip=20Ros=C3=A9en?= Date: Thu, 18 May 2017 12:01:14 +0200 Subject: [PATCH] playlist/thread: do not stop on removed node MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If get_current_status_item( p_playlist ) returns NULL there are no previously "playing" entity on automatic next, meaning that it is very confusing if the playlist stops at such (non-existing) entity. Given a flat playlist, a node containing children will be removed and the children posted to the node's parent, meaning that the original node is removed. Given that the node is removed, stopping after "playback" of such entity looks like we simply did nothing (imagine a directory containing no children). Signed-off-by: RĂ©mi Denis-Courmont --- src/playlist/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/playlist/thread.c b/src/playlist/thread.c index 104c92364a..5632babe4d 100644 --- a/src/playlist/thread.c +++ b/src/playlist/thread.c @@ -373,7 +373,7 @@ static playlist_item_t *NextItem( playlist_t *p_playlist ) msg_Dbg( p_playlist,"repeating item" ); return get_current_status_item( p_playlist ); } - if( b_playstop ) + if( b_playstop && get_current_status_item( p_playlist ) ) { msg_Dbg( p_playlist,"stopping (play and stop)" ); return NULL; -- 2.11.4.GIT