Fix album lists, to use annotations

This commit is contained in:
Deluan 2020-01-22 01:00:00 -05:00
parent d7116eebd4
commit c8a74881d8
6 changed files with 75 additions and 19 deletions

View file

@ -28,6 +28,7 @@ type AlbumRepository interface {
Get(id string) (*Album, error)
FindByArtist(artistId string) (Albums, error)
GetAll(...QueryOptions) (Albums, error)
GetMap(ids []string) (map[string]Album, error)
GetRandom(...QueryOptions) (Albums, error)
GetStarred(userId string, options ...QueryOptions) (Albums, error)
Search(q string, offset int, size int) (Albums, error)

View file

@ -24,6 +24,7 @@ type AnnotationMap map[string]Annotation
type AnnotationRepository interface {
Get(userID, itemType string, itemID string) (*Annotation, error)
GetAll(userID, itemType string, options ...QueryOptions) ([]Annotation, error)
GetMap(userID, itemType string, itemID []string) (AnnotationMap, error)
Delete(userID, itemType string, itemID ...string) error
IncPlayCount(userID, itemType string, itemID string, ts time.Time) error