-
-
Notifications
You must be signed in to change notification settings - Fork 129
fix(getPlaylist): populate ArtistID and AlbumID #567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Tests fixed.
|
thanks @richardsamuels would you mind rebasing? i also usually format with |
@@ -101,6 +102,9 @@ func NewTCTrackByFolder(t *db.Track, parent *db.Album) *TrackChild { | |||
trCh.Genres = append(trCh.Genres, &GenreRef{Name: g.Name}) | |||
} | |||
for _, a := range t.Artists { | |||
if a.Name == t.TagTrackArtist { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
The OpenSubsonic getPlaylist spec doc lists
artistId
andalbumId
as fields for playlist entries, which are currently not being populated.This PR populates those fields.