1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-08 17:46:34 +02:00

feat: support itunes namespace in top channel feed (#3776)

Also preserves other properties.
This commit is contained in:
Dag
2024-01-09 20:18:33 +01:00
committed by GitHub
parent ea58c8d2bc
commit 3ce94409ab
22 changed files with 298 additions and 203 deletions

View File

@@ -25,18 +25,18 @@ class JsonFormat extends FormatAbstract
public function stringify()
{
$host = $_SERVER['HTTP_HOST'] ?? '';
$extraInfos = $this->getExtraInfos();
$feedArray = $this->getFeed();
$data = [
'version' => 'https://jsonfeed.org/version/1',
'title' => empty($extraInfos['name']) ? $host : $extraInfos['name'],
'home_page_url' => empty($extraInfos['uri']) ? REPOSITORY : $extraInfos['uri'],
'feed_url' => get_current_url(),
'version' => 'https://jsonfeed.org/version/1',
'title' => $feedArray['name'],
'home_page_url' => $feedArray['uri'],
'feed_url' => get_current_url(),
];
if (!empty($extraInfos['icon'])) {
$data['icon'] = $extraInfos['icon'];
$data['favicon'] = $extraInfos['icon'];
if ($feedArray['icon']) {
$data['icon'] = $feedArray['icon'];
$data['favicon'] = $feedArray['icon'];
}
$items = [];