From 701d1d88c7966986c6cb72795a7e455ddb4c16f5 Mon Sep 17 00:00:00 2001 From: wutschel Date: Sat, 30 Nov 2024 09:53:22 +0100 Subject: [PATCH] Change logic for playlist updates in Party Mode Current logic ignored playlist updates in Party Mode to avoid flickering. Playlist reloads are handled by updatePartyModePlaylist which are called for each new song in Party Mode. This causes any user triggered playlist change, e.g. adding an item, to be ignored as well. With this change any playlist update again triggers a playlist reload by also calling updatePartyModePlaylist while in Party Mode. --- XBMC Remote/NowPlaying.m | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/XBMC Remote/NowPlaying.m b/XBMC Remote/NowPlaying.m index 9fa509fb6..c37d74a7c 100644 --- a/XBMC Remote/NowPlaying.m +++ b/XBMC Remote/NowPlaying.m @@ -2913,11 +2913,6 @@ - (void)handleEnterForeground:(NSNotification*)sender { } - (void)handleXBMCPlaylistHasChanged:(NSNotification*)sender { - // Party mode will cause playlist updates for each new song, if TCP is enabled. Just ignore here and - // let this be handled by the updatePartyModePlaylist which is called for each new song in Party Mode. - if (musicPartyMode) { - return; - } NSDictionary *theData = sender.userInfo; if ([theData isKindOfClass:[NSDictionary class]]) { currentPlaylistID = [theData[@"params"][@"data"][@"playlistid"] intValue]; @@ -2939,7 +2934,14 @@ - (void)handleXBMCPlaylistHasChanged:(NSNotification*)sender { } - (void)clearAndReloadPlaylist { - [self createPlaylistAnimated:YES]; + // While in Party Mode only reload playlist via updatePartyModePlaylist. This does not animate the playlist + // to avoid flickering and it blocks moving the focus to music playlist. + if (musicPartyMode) { + [self updatePartyModePlaylist]; + } + else { + [self createPlaylistAnimated:YES]; + } } - (BOOL)shouldAutorotate {