fix: if the rss podcast server does not respond, do not crash when exporting

This commit is contained in:
Michel Roux 2024-01-30 14:38:26 +01:00
parent 9fa69dfbb8
commit 1c261fbe4b
1 changed files with 5 additions and 1 deletions

View File

@ -51,7 +51,11 @@ class OpmlController extends Controller
$subscriptions = $this->podcastMetricsReader->metrics($this->userService->getUserUID());
foreach ($subscriptions as $subscription) {
$podcast = $this->podcastDataReader->getCachedOrFetchPodcastData($subscription->getUrl(), $this->userService->getUserUID());
try {
$podcast = $this->podcastDataReader->getCachedOrFetchPodcastData($subscription->getUrl(), $this->userService->getUserUID());
} catch (\Exception $e) {
continue;
}
if ($podcast) {
$outline = $body->addChild('outline');