mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-10 17:08:47 +00:00
fix(feedmerge): allow a single feed to break, and dont break the whole bridge (#3476)
This commit is contained in:
parent
a21d496bc7
commit
82c22bd2b5
@ -58,9 +58,21 @@ TEXT;
|
|||||||
$feeds = array_filter($feeds);
|
$feeds = array_filter($feeds);
|
||||||
|
|
||||||
foreach ($feeds as $feed) {
|
foreach ($feeds as $feed) {
|
||||||
// Fetch all items from the feed
|
if (count($feeds) > 1) {
|
||||||
// todo: consider wrapping this in a try..catch to not let a single feed break the entire bridge?
|
// Allow one or more feeds to fail
|
||||||
|
try {
|
||||||
$this->collectExpandableDatas($feed);
|
$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
|
// Sort by timestamp descending
|
||||||
|
Loading…
Reference in New Issue
Block a user