Skip to content

Group albums by type in ArtistDetails#155

Merged
tamland merged 2 commits intotamland:masterfrom
sentriz:only-release-groups
Aug 9, 2025
Merged

Group albums by type in ArtistDetails#155
tamland merged 2 commits intotamland:masterfrom
sentriz:only-release-groups

Conversation

@sentriz
Copy link
Copy Markdown
Contributor

@sentriz sentriz commented Jul 7, 2025

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

image
Screen Shot 2025-07-07 at 22 21 53

@sentriz sentriz force-pushed the only-release-groups branch from f47530a to 08b380a Compare July 7, 2025 17:38
},
albums(): Album[] {
return orderBy(this.item?.albums ?? [], 'year', this.mainStore.artistAlbumSortOrder)
albums(): { releaseType: string, albums: Album[] }[] {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

<h4 class="mt-3 text-muted">
{{ releaseType }}
</h4>
<hr class="my-2">
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about this <hr>, might look cleaner without it

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to just drop the top level "Albums" header and make them all h3

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah nice. though the sort button would need to be somewhere else then right? or on every section?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every section is fine. It toggles the order globally anyway :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, i'll add that then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tamland updated 👍

image

@sentriz sentriz force-pushed the only-release-groups branch from 08b380a to fd8b3b2 Compare August 8, 2025 20:03
@sentriz sentriz force-pushed the only-release-groups branch from fd8b3b2 to 07a8d65 Compare August 8, 2025 20:06
@tamland tamland merged commit 7263d83 into tamland:master Aug 9, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants