Optimize AlbumRepository.GetAll and add a GetAllWithoutGenres method specifically for Subsonic API, where multiple-genres are not required
This commit is contained in:
@@ -74,6 +74,10 @@ func (m *MockAlbumRepo) GetAll(qo ...model.QueryOptions) (model.Albums, error) {
|
||||
return m.all, nil
|
||||
}
|
||||
|
||||
func (m *MockAlbumRepo) GetAllWithoutGenres(qo ...model.QueryOptions) (model.Albums, error) {
|
||||
return m.GetAll(qo...)
|
||||
}
|
||||
|
||||
func (m *MockAlbumRepo) IncPlayCount(id string, timestamp time.Time) error {
|
||||
if m.err {
|
||||
return errors.New("error")
|
||||
|
||||
Reference in New Issue
Block a user