Adding the currently playing album to the playlist duplicates the track list in the cover tab #78

Open
opened 2020-10-11 08:18:18 +02:00 by oenometer · 5 comments
oenometer commented 2020-10-11 08:18:18 +02:00 (Migrated from gitlab.com)

If the same album that is currently being played is added to the playlist a second time, the track list on the cover tab is duplicated.

Steps to reproduce:

  1. Add an album to the playlist using the library tab, by clicking on the cover then hitting play
  2. Add the same album to the playlist using the library tab, by clicking the cover, then hitting play
  3. Switch to the cover tab
  4. Observe that the track list has been duplicated, and two copies of the album's tracks are displayed

Found in MCG version 2.1.2

If the same album that is currently being played is added to the playlist a second time, the track list on the cover tab is duplicated. Steps to reproduce: 1. Add an album to the playlist using the library tab, by clicking on the cover then hitting play 2. Add the same album to the playlist using the library tab, by clicking the cover, then hitting play 3. Switch to the cover tab 4. Observe that the track list has been duplicated, and two copies of the album's tracks are displayed Found in MCG version 2.1.2
oenometer commented 2020-10-11 08:36:44 +02:00 (Migrated from gitlab.com)

mentioned in merge request !1

mentioned in merge request !1
coderkun commented 2020-10-11 18:23:56 +02:00 (Migrated from gitlab.com)

assigned to @oenometer

assigned to @oenometer
coderkun commented 2020-10-11 18:39:10 +02:00 (Migrated from gitlab.com)

I like that an album will not get added twice to (the end of) the playlist. However I would probably add the same check to the queue action. What do you think about that, @oenometer?

You added the commit to both the master and the stable branch. Would you see this issue as a bug or as an improvement?

I like that an album will not get added twice to (the end of) the playlist. However I would probably add the same check to the queue action. What do you think about that, @oenometer? You added the commit to both the master and the stable branch. Would you see this issue as a bug or as an improvement?
oenometer commented 2020-10-12 11:32:01 +02:00 (Migrated from gitlab.com)

I originally added it only to the _play_album() method rather than the queue action, as I wasn't seeing the duplicated track list when I queued the album using the library tab. Today I've managed to reproduce the same bug using the queue method however; by queuing the album twice, then switching to the playlist tab and hitting play on the album.

I agree that this check should be moved into the Client._queue_album() method. I'll have a go at doing this, and will also change the comparison to the album classes instead of their id.

I would classify this issue as a bug. The reason I committed to stable was because I had some trouble running the GTK dependencies after commit ba373ddf, but this is probably just because of my environment. If you'd prefer I can edit the branches in the merge request to point to stable?

Edit:
I've updated the merge request with to use a check in the _queue_album() method. I realized however that this will prevent a user's playlist from replaying the same album more than once in a row, which may be behaviour you want to keep. In addition, even with this fix I'm able to reproduce the duplicate track list bug by:

  1. queuing album A to the playlist
  2. queuing album B to the playlist
  3. queuing album A to the playlist
  4. removing album B from the playlist using the playlist tab
  5. viewing the track list in the cover tab

I think I've approached this wrong, and may instead need to take a look into how the cover and playlist tabs are separating the playlist into albums. What is your preference for displaying repeated albums in these tabs? Do you have any pointers on where I could get started, or how you'd like this handled?

I originally added it only to the _play_album() method rather than the queue action, as I wasn't seeing the duplicated track list when I queued the album using the library tab. Today I've managed to reproduce the same bug using the queue method however; by queuing the album twice, then switching to the playlist tab and hitting play on the album. I agree that this check should be moved into the Client._queue_album() method. I'll have a go at doing this, and will also change the comparison to the album classes instead of their id. I would classify this issue as a bug. The reason I committed to stable was because I had some trouble running the GTK dependencies after commit ba373ddf, but this is probably just because of my environment. If you'd prefer I can edit the branches in the merge request to point to stable? Edit: I've updated the merge request with to use a check in the _queue_album() method. I realized however that this will prevent a user's playlist from replaying the same album more than once in a row, which may be behaviour you want to keep. In addition, even with this fix I'm able to reproduce the duplicate track list bug by: 1. queuing album A to the playlist 2. queuing album B to the playlist 3. queuing album A to the playlist 4. removing album B from the playlist using the playlist tab 5. viewing the track list in the cover tab I think I've approached this wrong, and may instead need to take a look into how the cover and playlist tabs are separating the playlist into albums. What is your preference for displaying repeated albums in these tabs? Do you have any pointers on where I could get started, or how you'd like this handled?
coderkun commented 2020-10-18 10:32:04 +02:00 (Migrated from gitlab.com)

@oenometer, I see “play” as “queue” + “start”. In this regard the “play” option should behave the same way as the single “queue” option. However the more I think about this the more I get the impression that the actual problem is not the queuing behaviour but the lack of the playlist to detect if the same album has been added multiple times in a row. If we fix that somehow, issue #78 would not be a problem anymore, I think.

@oenometer, I see “play” as “queue” + “start”. In this regard the “play” option should behave the same way as the single “queue” option. However the more I think about this the more I get the impression that the actual problem is not the queuing behaviour but the lack of the playlist to detect if the same album has been added multiple times in a row. If we fix that somehow, issue #78 would not be a problem anymore, I think.
coderkun added this to the v4.3 milestone 2025-04-13 14:20:08 +02:00
Sign in to join this conversation.
No description provided.