1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-31 13:50:23 +02:00

fix(feedmerge): allow a single feed to break, and dont break the whole bridge (#3476)

This commit is contained in:
Dag
2023-07-05 05:41:01 +02:00
committed by GitHub
parent a21d496bc7
commit 82c22bd2b5

View File

@@ -58,9 +58,21 @@ TEXT;
$feeds = array_filter($feeds);
foreach ($feeds as $feed) {
// Fetch all items from the feed
// todo: consider wrapping this in a try..catch to not let a single feed break the entire bridge?
$this->collectExpandableDatas($feed);
if (count($feeds) > 1) {
// Allow one or more feeds to fail
try {
$this->collectExpandableDatas($feed);
} catch (HttpException $e) {
$this->items[] = [
'title' => 'RSS-Bridge: ' . $e->getMessage(),
// Give current time so it sorts to the top
'timestamp' => time(),
];
continue;
}
} else {
$this->collectExpandableDatas($feed);
}
}
// Sort by timestamp descending