Fix ServeGetArtists and ServeGetStarred to conform to spec more
This commit is contained in:
No files matched your search
@@ -6,14 +6,22 @@ import (
|
||||
"sort"
|
||||
|
||||
"go.senan.xyz/gonic/db"
|
||||
"go.senan.xyz/gonic/server/ctrlsubsonic/specid"
|
||||
)
|
||||
|
||||
func NewAlbumByFolder(f *db.Album) *Album {
|
||||
artist := ""
|
||||
var parentSID *specid.ID
|
||||
if f.Parent != nil {
|
||||
artist = f.Parent.RightPath
|
||||
parentSID = f.ParentSID()
|
||||
}
|
||||
|
||||
a := &Album{
|
||||
Artist: f.Parent.RightPath,
|
||||
Artist: artist,
|
||||
ID: f.SID(),
|
||||
IsDir: true,
|
||||
ParentID: f.ParentSID(),
|
||||
ParentID: parentSID,
|
||||
Album: f.RightPath,
|
||||
Name: f.RightPath,
|
||||
Title: f.RightPath,
|
||||
|
||||
Reference in New Issue
Block a user