Skip to content

fix(getPlaylist): populate ArtistID and AlbumID - #567

Merged
sentriz merged 7 commits into
sentriz:masterfrom
richardsamuels:fix-playlist-fields
Aug 21, 2025
Merged

fix(getPlaylist): populate ArtistID and AlbumID#567
sentriz merged 7 commits into
sentriz:masterfrom
richardsamuels:fix-playlist-fields

Conversation

@richardsamuels

Copy link
Copy Markdown
Contributor

The OpenSubsonic getPlaylist spec doc lists artistId and albumId as fields for playlist entries, which are currently not being populated.

This PR populates those fields.

@richardsamuels

Copy link
Copy Markdown
Contributor Author

Tests fixed.

  • The changes to .golangci.yml are to fix this error that popped up. It appears to be caused by an update to your linter action.
  • The testdata files were not formatted in a readable way after using GONIC_REGEN, so I ran them through jq. This did not match your previous formatting perfectly. Let me know if you have a preferred linter for those files and I can fix them.
@sentriz

sentriz commented Mar 24, 2025

Copy link
Copy Markdown
Owner

thanks @richardsamuels would you mind rebasing? i also usually format with prettier --parser json --write server/ctrlsubsonic/testdata/*

trCh.Genres = append(trCh.Genres, &GenreRef{Name: g.Name})
}
for _, a := range t.Artists {
if a.Name == t.TagTrackArtist {

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.

what's this check for?

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.

Each TrackChild has a single ArtistID, which corresponds to the TagTrackArtist. The check just makes sure that we assign the correct ArtistID to to the TrackChild. If this check wasn't here, it would assign the track's ArtistID to the last artist in the Artists list

@sentriz
sentriz merged commit c6d8751 into sentriz:master Aug 21, 2025
lurenyang418 pushed a commit to lurenyang418/gonic that referenced this pull request Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants