GetStarred now returns starred songs
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"errors"
|
||||
"sort"
|
||||
|
||||
"time"
|
||||
|
||||
"github.com/deluan/gosonic/domain"
|
||||
)
|
||||
|
||||
@@ -43,6 +45,13 @@ func (r *mediaFileRepository) FindByAlbum(albumId string) (domain.MediaFiles, er
|
||||
return mfs, err
|
||||
}
|
||||
|
||||
func (r *mediaFileRepository) GetStarred(options domain.QueryOptions) (domain.MediaFiles, error) {
|
||||
var mfs = make(domain.MediaFiles, 0)
|
||||
start := time.Time{}.Add(time.Duration(1) * time.Hour)
|
||||
err := r.loadRange("Starred", start, time.Now(), &mfs, options)
|
||||
return mfs, err
|
||||
}
|
||||
|
||||
func (r *mediaFileRepository) PurgeInactive(active domain.MediaFiles) ([]string, error) {
|
||||
return r.purgeInactive(active, func(e interface{}) string {
|
||||
return e.(domain.MediaFile).Id
|
||||
|
||||
Reference in New Issue
Block a user