don't always return cover id for newalbumbyfolder
This commit is contained in:
@@ -7,15 +7,18 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func NewAlbumByFolder(f *model.Album) *Album {
|
func NewAlbumByFolder(f *model.Album) *Album {
|
||||||
return &Album{
|
a := &Album{
|
||||||
Artist: f.Parent.RightPath,
|
Artist: f.Parent.RightPath,
|
||||||
CoverID: f.ID,
|
|
||||||
ID: f.ID,
|
ID: f.ID,
|
||||||
IsDir: true,
|
IsDir: true,
|
||||||
ParentID: f.ParentID,
|
ParentID: f.ParentID,
|
||||||
Title: f.RightPath,
|
Title: f.RightPath,
|
||||||
TrackCount: f.ChildCount,
|
TrackCount: f.ChildCount,
|
||||||
}
|
}
|
||||||
|
if f.Cover != "" {
|
||||||
|
a.CoverID = f.ID
|
||||||
|
}
|
||||||
|
return a
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewTCAlbumByFolder(f *model.Album) *TrackChild {
|
func NewTCAlbumByFolder(f *model.Album) *TrackChild {
|
||||||
|
|||||||
Reference in New Issue
Block a user