More experimenting with tiedot
This commit is contained in:
+22
-8
@@ -1,13 +1,27 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type MediaFile struct {
|
||||
Id string
|
||||
Path string
|
||||
Album string
|
||||
Artist string
|
||||
Title string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
Id string
|
||||
Path string
|
||||
Title string
|
||||
Album string
|
||||
Artist string
|
||||
AlbumArtist string
|
||||
Compilation bool
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
func (m*MediaFile) RealArtist() string {
|
||||
if (m.Compilation) {
|
||||
return "Various Artists"
|
||||
}
|
||||
if (m.AlbumArtist != "") {
|
||||
return m.AlbumArtist
|
||||
}
|
||||
return m.Artist
|
||||
}
|
||||
Reference in New Issue
Block a user