Implemented more getAlbumList.view types
This commit is contained in:
@@ -13,6 +13,8 @@ type Album struct {
|
||||
Year int
|
||||
Compilation bool
|
||||
Starred bool
|
||||
PlayCount int
|
||||
PlayDate time.Time
|
||||
Rating int
|
||||
Genre string
|
||||
CreatedAt time.Time
|
||||
|
||||
+7
-3
@@ -1,8 +1,8 @@
|
||||
package domain
|
||||
|
||||
import (
|
||||
"time"
|
||||
"mime"
|
||||
"time"
|
||||
)
|
||||
|
||||
type MediaFile struct {
|
||||
@@ -23,6 +23,9 @@ type MediaFile struct {
|
||||
BitRate int
|
||||
Genre string
|
||||
Compilation bool
|
||||
PlayCount int
|
||||
PlayDate time.Time
|
||||
Rating int
|
||||
Starred bool
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
@@ -33,10 +36,11 @@ func (mf *MediaFile) ContentType() string {
|
||||
}
|
||||
|
||||
type MediaFiles []MediaFile
|
||||
func (a MediaFiles) Len() int { return len(a) }
|
||||
|
||||
func (a MediaFiles) Len() int { return len(a) }
|
||||
func (a MediaFiles) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
|
||||
func (a MediaFiles) Less(i, j int) bool {
|
||||
return (a[i].DiscNumber * 1000 + a[i].TrackNumber) < (a[j].DiscNumber * 1000 + a[j].TrackNumber)
|
||||
return (a[i].DiscNumber*1000 + a[i].TrackNumber) < (a[j].DiscNumber*1000 + a[j].TrackNumber)
|
||||
}
|
||||
|
||||
type MediaFileRepository interface {
|
||||
|
||||
Reference in New Issue
Block a user