Converted all collections from repositories to *collections
This commit is contained in:
+2
-2
@@ -27,7 +27,7 @@ type AlbumRepository interface {
|
||||
BaseRepository
|
||||
Put(m *Album) error
|
||||
Get(id string) (*Album, error)
|
||||
FindByArtist(artistId string) (Albums, error)
|
||||
GetAll(QueryOptions) (Albums, error)
|
||||
FindByArtist(artistId string) (*Albums, error)
|
||||
GetAll(QueryOptions) (*Albums, error)
|
||||
PurgeInactive(active *Albums) error
|
||||
}
|
||||
|
||||
+3
-2
@@ -13,7 +13,8 @@ type ArtistIndex struct {
|
||||
}
|
||||
|
||||
type ArtistInfos []ArtistInfo
|
||||
func (a ArtistInfos) Len() int { return len(a) }
|
||||
|
||||
func (a ArtistInfos) Len() int { return len(a) }
|
||||
func (a ArtistInfos) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
|
||||
func (a ArtistInfos) Less(i, j int) bool {
|
||||
return utils.NoArticle(a[i].Artist) < utils.NoArticle(a[j].Artist)
|
||||
@@ -25,5 +26,5 @@ type ArtistIndexRepository interface {
|
||||
BaseRepository
|
||||
Put(m *ArtistIndex) error
|
||||
Get(id string) (*ArtistIndex, error)
|
||||
GetAll() (ArtistIndexes, error)
|
||||
GetAll() (*ArtistIndexes, error)
|
||||
}
|
||||
|
||||
+1
-1
@@ -47,6 +47,6 @@ type MediaFileRepository interface {
|
||||
BaseRepository
|
||||
Put(m *MediaFile) error
|
||||
Get(id string) (*MediaFile, error)
|
||||
FindByAlbum(albumId string) (MediaFiles, error)
|
||||
FindByAlbum(albumId string) (*MediaFiles, error)
|
||||
PurgeInactive(active *MediaFiles) error
|
||||
}
|
||||
|
||||
@@ -9,5 +9,5 @@ type MediaFolder struct {
|
||||
type MediaFolders []MediaFolder
|
||||
|
||||
type MediaFolderRepository interface {
|
||||
GetAll() (MediaFolders, error)
|
||||
GetAll() (*MediaFolders, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user