Bug 411674 - When repeat is on, playlist does not repeat after reaching the end when the playlist has only one track in it
Summary: When repeat is on, playlist does not repeat after reaching the end when the p...
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Archlinux Linux
: NOR normal
Target Milestone: ---
Assignee: Matthieu Gallien
Depends on:
Reported: 2019-09-07 16:13 UTC by Patrick Silva
Modified: 2019-11-19 20:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 19.12.0


Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2019-09-07 16:13:08 UTC
Firstly, make sure repeat playlist feature is enabled.

1. add two tracks to your playlist
2. start to play the first track
3. while Elisa plays the first track, hover over the second track and click on its "Remove" button
4. wait playback of the first track to finish

playback stops. Click on play button and double click on the track in the playlist do nothing.
It's impossible to play the track in the playlist even after I restart Elisa.

track in the playlist is repeated

Operating System: Arch Linux 
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.61.0
Qt Version: 5.13.1
Comment 1 Patrick Silva 2019-09-07 16:18:27 UTC
I use nighly build installed via flatpak.
Comment 2 Nate Graham 2019-09-12 16:29:06 UTC
Can reproduce with git master version.
Comment 3 Alexander Stippich 2019-09-12 19:21:11 UTC
I can also reproduce. However, I think the problem only occurs when there is only one track in the playlist. Elisa only plays a new song if the url changes, which it does not in this case. 

Can you confirm by testing with repeat mode enabled:

Having more than two tracks in the playlist, play the second to last track and remove the last track during playback. Playback should continue with the first track.

Add one track to the playlist and let it end. Error described in this report should occur.
Comment 4 Nate Graham 2019-09-12 19:27:06 UTC
Yep, can confirm. The problem only happens when there is only one track left in the playlist after removals.
Comment 5 Alexander Stippich 2019-09-13 20:47:38 UTC
The bug is in ManageAudioPlayer only setting the new source if it differs from the previous one. However, since I am not really familiar with that part of the code, I will leave this to Matthieu :)
Comment 6 Matthieu Gallien 2019-09-14 10:53:25 UTC
I will take care of it.
Comment 7 Nate Graham 2019-11-19 20:22:57 UTC
Fixed by https://invent.kde.org/kde/elisa/merge_requests/32