Bug 441879 - Randomize mode that picks random albums, not random tracks
Summary: Randomize mode that picks random albums, not random tracks
Status: ASSIGNED
Alias: None
Product: Elisa
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-01 19:22 UTC by Radoslaw Jurga
Modified: 2024-05-09 16:23 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Radoslaw Jurga 2021-09-01 19:22:35 UTC
Add a play mode where a random album is selected, then all the tracks of that album are played sequentially in order. After the last track, another random album is selected, and it continues.

This is how I mainly use music players, so for someone like me it is the main functionality missing in Elisa.

In cmus, there is a shuffle toggle that has two modes, shuffle by track or by album. In Lollypop, instead, there is a specific random album mode which shuffles all the albums and effectively makes a temporary corresponding playlist.

In my humble opinion, here is how it could be nicely integrated in Elisa: In the albums page, there is a "sort" drop-down menu. Currently it can sort by title, artist, genre and year. A "random" sort option could be added there. Then, after they are randomly sorted, clicking on the "enqueue" button would enqueue the albums in that randomly sorted order.
Comment 1 Nate Graham 2021-09-02 17:50:12 UTC
So you want random albums, not random songs. I'd kinda like that myself.
Comment 2 Radoslaw Jurga 2021-09-02 17:56:49 UTC
Yes, that's it.

Here's a use case where it makes the most sense: classical music. You don't listen to a random movement of a symphony, only to switch to another random movement of some other concerto, for example. A symphony or a concerto is typically listened in full, sequentially. So the randomness here should be at the level of selecting the symphony/concerto, which usually is a whole album.
Comment 3 Nate Graham 2021-09-02 18:06:51 UTC
Yep, makes total sense to me.
Comment 4 Be 2022-04-19 21:09:04 UTC
Rather than shuffling by album within the current playlist, I'd like to have a sorting option for the albums grid that sorts randomly.
Comment 5 Paul Elliott 2023-09-13 12:10:13 UTC
Just adding my +1 that this is the main thing stopping me using Elisa. I may have to browse the source.
Comment 6 bart 2023-09-13 12:37:12 UTC
(In reply to Paul Elliott from comment #5)
> Just adding my +1 that this is the main thing stopping me using Elisa. I may
> have to browse the source.

I actually started working on this a while ago. I think the implementation is mainly complete except for:
- icon to represent album shuffle;
- part of the implementation when new tracks are added to a pre-existing non-empty playlist (but this is close to complete, just had some bugs if I remember correctly)

Here's the reference to the branch.
https://invent.kde.org/bdevries/elisa/-/tree/work/album-shuffle?ref_type=heads

I'll see if I find some time to finish this.  Alternatively, if someone wants to pick this up and finish it, just let me know.
Comment 7 Bug Janitor Service 2024-04-26 14:44:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/575
Comment 8 Bug Janitor Service 2024-04-26 14:44:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/575
Comment 9 bart 2024-05-09 16:23:36 UTC
Git commit 08fbb15415201b0bf70a18348a07baea126ed1ba by Bart De Vries.
Committed on 09/05/2024 at 06:52.
Pushed by ngraham into branch 'master'.

Implement album shuffle option on playlist

Additional test added to check:
- switching between the shuffle modes
- save and restore playlist shuffle state
- enqueueing tracks while shuffle mode is active
- check whether album tracks remain properly grouped in album shuffle
  mode

M  +404  -99   autotests/mediaplaylistproxymodeltest.cpp
M  +8    -2    autotests/mediaplaylistproxymodeltest.h
M  +4    -1    src/CMakeLists.txt
M  +229  -54   src/mediaplaylistproxymodel.cpp
M  +18   -7    src/mediaplaylistproxymodel.h
M  +6    -5    src/mpris2/mediaplayer2player.cpp
M  +1    -1    src/mpris2/mediaplayer2player.h
M  +54   -4    src/qml/MediaPlayerControl.qml
M  +10   -10   src/qml/NativeGlobalMenu.qml
A  +16   -0    src/qml/NativeGlobalMenuShuffleModeItem.qml     [License: LGPL(v3.0+)]
A  +17   -0    src/qml/ShuffleModeItem.qml     [License: LGPL(v3.0+)]
M  +45   -4    src/qml/mobile/MobileTrackPlayer.qml

https://invent.kde.org/multimedia/elisa/-/commit/08fbb15415201b0bf70a18348a07baea126ed1ba