Skip to content

Commit

Permalink
Merge pull request #1201 from wutschel/improve_partymode
Browse files Browse the repository at this point in the history
Improvement: change logic for playlist updates in Party Mode
  • Loading branch information
kambala-decapitator authored Dec 21, 2024
2 parents d160ee6 + 701d1d8 commit 2eed37d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions XBMC Remote/NowPlaying.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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 {
Expand Down

0 comments on commit 2eed37d

Please sign in to comment.