From 8c32cd117abe79f4ee6cff3a950ffc35c95faeff Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 9 May 2026 11:11:49 +0300 Subject: Refine media browsing and set covers --- internal/repository/mock.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'internal/repository/mock.go') diff --git a/internal/repository/mock.go b/internal/repository/mock.go index d715984..d7b61a4 100644 --- a/internal/repository/mock.go +++ b/internal/repository/mock.go @@ -904,6 +904,11 @@ func (m *MockStore) GetFeedBySetID(ctx context.Context, setID int64) (*model.Pod return m.PodcastRepo.GetFeedBySetID(ctx, setID) } +// ListFeedsBySetID implements PodcastRepo. +func (m *MockStore) ListFeedsBySetID(ctx context.Context, setID int64) ([]model.PodcastFeed, error) { + return m.PodcastRepo.ListFeedsBySetID(ctx, setID) +} + // ListFeeds implements PodcastRepo. func (m *MockStore) ListFeeds(ctx context.Context) ([]model.PodcastFeed, error) { return m.PodcastRepo.ListFeeds(ctx) @@ -966,11 +971,12 @@ type MockPodcastRepo struct { DeleteFeedFunc func(ctx context.Context, id int64) error GetFeedByIDFunc func(ctx context.Context, id int64) (*model.PodcastFeed, error) GetFeedBySetIDFunc func(ctx context.Context, setID int64) (*model.PodcastFeed, error) + ListFeedsBySetIDFunc func(ctx context.Context, setID int64) ([]model.PodcastFeed, error) ListFeedsFunc func(ctx context.Context) ([]model.PodcastFeed, error) ListFeedsNeedingCheckFunc func(ctx context.Context, before time.Time) ([]model.PodcastFeed, error) - CreateEpisodeFunc func(ctx context.Context, episode *model.PodcastEpisode) (int64, error) - GetEpisodeByIDFunc func(ctx context.Context, id int64) (*model.PodcastEpisode, error) + CreateEpisodeFunc func(ctx context.Context, episode *model.PodcastEpisode) (int64, error) + GetEpisodeByIDFunc func(ctx context.Context, id int64) (*model.PodcastEpisode, error) GetEpisodeByGUIDFunc func(ctx context.Context, feedID int64, guid string) (*model.PodcastEpisode, error) ListEpisodesByFeedFunc func(ctx context.Context, feedID int64, limit, offset int) ([]model.PodcastEpisode, error) UpdateEpisodeMediaFunc func(ctx context.Context, episodeID, mediaID int64, fileName string) error @@ -1021,6 +1027,14 @@ func (m *MockPodcastRepo) GetFeedBySetID(ctx context.Context, setID int64) (*mod return nil, nil } +// ListFeedsBySetID calls ListFeedsBySetIDFunc or returns nil. +func (m *MockPodcastRepo) ListFeedsBySetID(ctx context.Context, setID int64) ([]model.PodcastFeed, error) { + if m.ListFeedsBySetIDFunc != nil { + return m.ListFeedsBySetIDFunc(ctx, setID) + } + return nil, nil +} + // ListFeeds calls ListFeedsFunc or returns nil. func (m *MockPodcastRepo) ListFeeds(ctx context.Context) ([]model.PodcastFeed, error) { if m.ListFeedsFunc != nil { -- cgit v1.2.3