mirror of
https://github.com/navidrome/navidrome.git
synced 2025-05-03 11:51:33 +03:00
28 lines
423 B
Go
28 lines
423 B
Go
package scanner
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Track struct {
|
|
Id string
|
|
Path string
|
|
Title string
|
|
Album string
|
|
Artist string
|
|
AlbumArtist string
|
|
Year int
|
|
Compilation bool
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|
|
|
|
func (m *Track) RealArtist() string {
|
|
if (m.Compilation) {
|
|
return "Various Artists"
|
|
}
|
|
if (m.AlbumArtist != "") {
|
|
return m.AlbumArtist
|
|
}
|
|
return m.Artist
|
|
} |