cache podcast images and use them on homepage

This commit is contained in:
2026-01-09 21:54:48 +01:00
parent d890c11a9b
commit f48aa86256
5 changed files with 264 additions and 2 deletions
@@ -119,6 +119,12 @@ public class JellypodController : ControllerBase
// Download podcast artwork
await _downloadService.DownloadPodcastArtworkAsync(podcast).ConfigureAwait(false);
// Download episode artwork for all initial episodes
foreach (var episode in podcast.Episodes)
{
await _downloadService.DownloadEpisodeArtworkAsync(podcast, episode).ConfigureAwait(false);
}
_logger.LogInformation("Added podcast: {Title} ({Url})", podcast.Title, podcast.FeedUrl);
return CreatedAtAction(nameof(GetPodcast), new { id = podcast.Id }, podcast);
@@ -230,6 +236,12 @@ public class JellypodController : ControllerBase
podcast.LastUpdated = DateTime.UtcNow;
await _storageService.UpdatePodcastAsync(podcast).ConfigureAwait(false);
// Download artwork for new episodes
foreach (var episode in newEpisodes)
{
await _downloadService.DownloadEpisodeArtworkAsync(podcast, episode).ConfigureAwait(false);
}
return Ok(podcast);
}