From 2e520662936fdfe82f4fd55972d7e6f30a61dc43 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Thu, 10 Feb 2022 21:48:30 -0800 Subject: [PATCH] Skip to next on trash, else stop playback Signed-off-by: Christopher Snowhill --- Playlist/PlaylistController.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index fc3ae2101..7d9afd1e8 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -735,8 +735,12 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc if([indexes containsIndex:currentEntry.index]) { [self updateNextAfterDeleted:currentEntry withDeleteIndexes:indexes]; - [playbackController playEntry:nextEntryAfterDeleted]; - nextEntryAfterDeleted = nil; + if(nextEntryAfterDeleted) { + [playbackController playEntry:nextEntryAfterDeleted]; + nextEntryAfterDeleted = nil; + } else { + [playbackController stop:nil]; + } } [[SQLiteStore sharedStore] playlistRemoveTracksAtIndexes:unarrangedIndexes