From ba321175276d20aee3320943f333c10adeffcc42 Mon Sep 17 00:00:00 2001 From: sentriz Date: Sat, 16 Nov 2024 14:39:15 +0000 Subject: [PATCH] don't download empty cover string --- podcast/podcast.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/podcast/podcast.go b/podcast/podcast.go index 747b0844..4679c3b3 100644 --- a/podcast/podcast.go +++ b/podcast/podcast.go @@ -319,6 +319,10 @@ func getPodcastEpisodeFilename(podcast *db.Podcast, podcastEpisode *db.PodcastEp } func (p *Podcasts) downloadPodcastCover(podcast *db.Podcast) error { + if podcast.ImageURL == "" { + return nil + } + imageURL, err := url.Parse(podcast.ImageURL) if err != nil { return fmt.Errorf("parse image url: %w", err)