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/api/handlers_podcast.go | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'internal/api/handlers_podcast.go') diff --git a/internal/api/handlers_podcast.go b/internal/api/handlers_podcast.go index f93b15c..721e83e 100644 --- a/internal/api/handlers_podcast.go +++ b/internal/api/handlers_podcast.go @@ -13,25 +13,17 @@ import ( // ------------------------------------------------------------------ func (s *Server) handleListPodcasts(w http.ResponseWriter, r *http.Request) { - if !requireService(w, s.browseSvc) { + if !requireService(w, s.podcastSvc) { return } - userID := userIDFromContext(r) - sets, err := s.browseSvc.ListSets(r.Context(), userID) + feeds, err := s.podcastSvc.ListFeeds(r.Context(), userIDFromContext(r)) if err != nil { s.logger.Error("list podcasts", "err", err) writeJSON(w, http.StatusInternalServerError, map[string]string{"error": "failed to list podcasts"}) return } - // Filter to podcast sets only. - var podcasts []interface{} - for _, set := range sets { - if set.IsPodcast { - podcasts = append(podcasts, set) - } - } - writeJSON(w, http.StatusOK, podcasts) + writeJSON(w, http.StatusOK, feeds) } func (s *Server) handleSubscribePodcast(w http.ResponseWriter, r *http.Request) { -- cgit v1.2.3