internet4000/radio4000

Loading a selection is not cleared by clicking on a track in channel.tracks list

4www opened this issue · 1 comments

4www commented

To reproduce:

  1. go to a channel's /tracks page.
  2. search tracks for any selection giving results
  3. load the search result in the player
  4. click any track from the all tracks list in this radio (not the list in the player, not a track which is in the player's track list)

Expected result: clicking a track (in a channel's /tracks list) not part of the player's track list, should load all tracks, and play the one that was clicked

Actual result: the clicked track is loaded, but the player's selection of tracks (from the previous search) is not cleared

Does this make sense?

Makes sense. So, when a track is played, we need to check:

if currentSelection && !currentSelection.contains(playedTrack) ==> reset playlist

?