mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-05 01:43:11 +03:00
Adding Album total time (Duration)
This commit is contained in:
parent
cdcb5c6f49
commit
2a2af2f57a
@ -15,6 +15,7 @@ type Album struct {
|
||||
Starred bool `idx:"Starred"`
|
||||
PlayCount int
|
||||
PlayDate time.Time
|
||||
Duration int
|
||||
Rating int
|
||||
Genre string
|
||||
CreatedAt time.Time
|
||||
|
@ -64,6 +64,7 @@ func FromAlbum(al *domain.Album) Entry {
|
||||
c.AlbumId = al.Id
|
||||
c.ArtistId = al.ArtistId
|
||||
c.UserRating = al.Rating
|
||||
c.Duration = al.Duration
|
||||
return c
|
||||
}
|
||||
|
||||
|
@ -263,6 +263,7 @@ func (s *ItunesScanner) collectAlbums(t *itl.Track, mf *domain.MediaFile, ar *do
|
||||
al.Genre = mf.Genre
|
||||
al.Artist = mf.Artist
|
||||
al.AlbumArtist = ar.Name
|
||||
al.Duration += mf.Duration
|
||||
|
||||
if mf.HasCoverArt {
|
||||
al.CoverArtId = mf.Id
|
||||
|
Loading…
x
Reference in New Issue
Block a user