Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/general/Jukebox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -557,15 +557,13 @@ private void PlayNextTrackFromList(TrackList list, Func<int, AudioPlayer> getPla

if (random.NextFloat() <= Constants.CONTEXTUAL_ONLY_MUSIC_CHANCE)
{
var contextMusicOnly = list.GetTracksForContexts(activeContexts).Where(c => c.ExclusiveToContexts != null)
var contextMusicOnly = list.GetTracksForContexts(activeContexts)
.Where(c => c.ExclusiveToContexts != null && !c.PlayedOnce)
.ToArray();

if (contextMusicOnly.Length > 0)
{
tracks = contextMusicOnly;

// TODO: it would be nice to ensure that contextual track doesn't cause the same track to play in a row
// Currently it is way more likely as most contexts only have one track for them.
}
}

Expand Down