cache podcast images and use them on homepage
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user