Group albums by type in ArtistDetails#155
Merged
tamland merged 2 commits intotamland:masterfrom Aug 9, 2025
Merged
Conversation
f47530a to
08b380a
Compare
sentriz
commented
Jul 8, 2025
| }, | ||
| albums(): Album[] { | ||
| return orderBy(this.item?.albums ?? [], 'year', this.mainStore.artistAlbumSortOrder) | ||
| albums(): { releaseType: string, albums: Album[] }[] { |
Contributor
Author
There was a problem hiding this comment.
could probably be made a bit more efficient and/or extracted out
needs to
- group flat album list by type
- sort those group by Albums at the top, etc
sentriz
commented
Jul 8, 2025
src/library/artist/ArtistDetails.vue
Outdated
| <h4 class="mt-3 text-muted"> | ||
| {{ releaseType }} | ||
| </h4> | ||
| <hr class="my-2"> |
Contributor
Author
There was a problem hiding this comment.
not sure about this <hr>, might look cleaner without it
Owner
There was a problem hiding this comment.
I think it would be better to just drop the top level "Albums" header and make them all h3
Contributor
Author
There was a problem hiding this comment.
oh yeah nice. though the sort button would need to be somewhere else then right? or on every section?
Owner
There was a problem hiding this comment.
Every section is fine. It toggles the order globally anyway :)
Contributor
Author
There was a problem hiding this comment.
nice, i'll add that then
08b380a to
fd8b3b2
Compare
fd8b3b2 to
07a8d65
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Renders albums on the artist page in categories such as (Single, Album, EP, Compilation, etc)
Based on OpenSubsonic AlbumID3
Note: For backwards compatibility, groups are not shown when there is only one group type (which will be Unknown when not present in response)
Groups are sorted in order Album, EP, Single. then anything after (Compilation, Other) comes later