Erroneously playing the start of removed song from the queue

Issue description:

Latest stable version. Gapless enabled, using mp3s.

Scenario:

  1. Queue playing
  2. While a song is playing, clear the remaining queue, either through swiping them away individually, or using the ‘clear remaining queue’ function.

Expected outcome: when the song ends, there is silence

Actual outcome: when the song ends, the very start of the last removed song from the queue will be played

For example, queue:

Song 0
Song 1 ← playing
Song 2
Song 3

If, while song 1 is playing, I swipe song 2, then song 3 away, the start of song 3 will play at the end of song 1 despite the queue having no remaining songs.

If I swipe song 3, then song 2 away, the start of song 2 will play.

If I use ‘clear remaining queue’, it seems the start of song 2 will play.

If I clear song 2 and 3 while song 0 is playing, there is silence at the end of song 1, as expected.

I have videoed this happening. Showing the start of the next song being played after swiping it away. I also showed it not happening if the intentionally played song is queued individually.

I will add the name of this thread and my username in the description.

Logs:

Upload description: tobyburton96

Additional information:

 

 

Reproduction steps:

 

 

Media provider:

Local device

Screenshots: