Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#4105 closed patch (fixed)

Fix album sort order so that it sorts, not just groups

Reported by: Paul Lambert <paul at planar.id.au> Owned by: paulh
Priority: minor Milestone: 0.21
Component: mythmusic Version: head
Severity: low Keywords: shuffle album
Cc: Ticket locked: no

Description

The album sort order as it stands purely groups albums together, but sorts the albums in random order. It looks like the code intended to sort the albums in order of artist/album title. I have corrected the code so that it does that.

To test, apply the patch, select album shuffle mode, and review the info on some tracks to verify that the playlist has been sorted correctly.

Like all the current shuffle modes, this has undesirable side effects if you have elected to display the full music tree in your main mythmusic page. I still want to fix that sometime. This code actually displays in artist/album order, which means that albums with multiple artists within them will not group correctly. I will separately apply a new shuffle mode that sorts purely by album.

Attachments (2)

albumfix.patch (2.8 KB) - added by Paul Lambert <paul at planar.id.au> 16 years ago.
albumfix2.patch (3.4 KB) - added by Paul Lambert <paul at planar.id.au> 16 years ago.

Download all attachments as: .zip

Change History (7)

Changed 16 years ago by Paul Lambert <paul at planar.id.au>

Attachment: albumfix.patch added

comment:1 Changed 16 years ago by Paul Lambert <paul at planar.id.au>

Tidied up the patch so it applies cleanly over the previously submitted ones. Also tidied up a little code - in an error situation it wasn't adding the nodes correctly. Also some minor formatting changes on the previous patch - one line of change.

Changed 16 years ago by Paul Lambert <paul at planar.id.au>

Attachment: albumfix2.patch added

comment:2 Changed 16 years ago by paulh

Component: mythtvmythmusic
Milestone: unknown0.21
Owner: changed from Isaac Richards to paulh
Version: unknownhead

Wouldn't it be better to sort by album name then track no?

Can't say I'm that bothered either way TBH but that's how I would expect a shuffle based on Album to work.

comment:3 Changed 16 years ago by Paul Lambert <paul at planar.id.au>

I thought that too. The original author seemed to have something particular in mind, and I wasn't sure it made sense to change that. As it stands it is easy to find an album if you know the artist but not the exact album title. Arguably you could now do that directly from the all my music tree.

I see this as having a handful of benefits:

  • let you play albums in the order they were originally intended (the patch as it stands does that, but the all my music tree does it better
  • let you find albums quickly. The all my music tree does that better too

If I modified as you suggest then you would be able to get to albums that have mixed artists on them, albeit there is no good visual cue of that album. That is something that has been annoying me, so I'll take a look at doing that.

It doesn't really help in getting the music into the playlist in the first place - once I rip say, a soundtrack, I then have to go surfing through the artists tree to find the songs so I can add them to a playlist and play them. I ripped the Grease soundtrack for my partner (I know, just mentioning that gets my negative points) and it doesn't tell me on the cover who sang half the songs - I have no idea where they went. What would be really cool is an album tree instead of/as well as the artists tree. So all my music - artist, and all my music - album.

comment:4 Changed 16 years ago by paulh

Resolution: fixed
Status: newclosed

(In [15209]) Change the 'Album' shuffle mode to be a little more intelligent and actually sort the tracks by album then track number.

Original patch by Paul Lambert. Slightly modified so it sorts by Album/TrackNo? not Artist/Album/TrackNo?. Closes #4105.

comment:5 Changed 16 years ago by jppoet@…

I was searching for the commit that "broke" the album *shuffle* mode and finally found this. If people really want it to work this way, that is fine -- I will just fix it back to being a *shuffle* in my own tree.

Note: See TracTickets for help on using tickets.