@@ -84,14 +84,10 @@ func NewArtistByFolder(f *db.Album) *Artist {
|
||||
}
|
||||
|
||||
func NewDirectoryByFolder(f *db.Album, children []*TrackChild) *Directory {
|
||||
dir := &Directory{
|
||||
return &Directory{
|
||||
ID: f.SID(),
|
||||
Name: f.RightPath,
|
||||
Children: children,
|
||||
ParentID: f.ParentSID(),
|
||||
}
|
||||
// don't show the root dir as a parent
|
||||
if f.ParentID != 1 {
|
||||
dir.ParentID = f.ParentSID()
|
||||
}
|
||||
return dir
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ type MusicFolders struct {
|
||||
}
|
||||
|
||||
type MusicFolder struct {
|
||||
ID int `xml:"id,attr,omitempty" json:"id,omitempty"`
|
||||
ID string `xml:"id,attr,omitempty" json:"id,omitempty"`
|
||||
Name string `xml:"name,attr,omitempty" json:"name,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user