mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-30 18:42:55 +00:00
Merge 00eb145320
into 354cea09a7
This commit is contained in:
commit
e26d50f45f
@ -59,13 +59,20 @@ class EpicGamesFreeBridge extends BridgeAbstract
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
$slug = $element['productSlug'] ?? $element['catalogNs']['mappings'][0]['pageSlug'] ?? null;
|
||||
if ($slug !== null) {
|
||||
$uri = parent::getURI() . $this->getInput('locale') . '/p/' . $slug;
|
||||
} else {
|
||||
// slug not found, show the root promos page
|
||||
$uri = parent::getURI() . $this->getInput('locale') . '/free-games';
|
||||
}
|
||||
$item = [
|
||||
'author' => $element['seller']['name'],
|
||||
'content' => $element['description'],
|
||||
'enclosures' => array_map(fn($item) => $item['url'], $element['keyImages']),
|
||||
'timestamp' => strtotime($promo['startDate']),
|
||||
'title' => $element['title'],
|
||||
'uri' => parent::getURI() . $this->getInput('locale') . '/p/' . $element['productSlug'],
|
||||
'uri' => $uri,
|
||||
];
|
||||
$this->items[] = $item;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user