mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-19 13:01:19 +00:00
parent
3747fa2c2b
commit
6833dd05ab
@ -598,7 +598,7 @@ class Episode extends Entity
|
||||
helper('rss');
|
||||
|
||||
$xmlNode = (new SimpleRSSElement(
|
||||
'<?xml version="1.0" encoding="utf-8"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"/>',
|
||||
'<?xml version="1.0" encoding="utf-8"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://podcastindex.org/namespace/1.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"/>',
|
||||
))
|
||||
->addChild('channel')
|
||||
->addChild('item');
|
||||
@ -622,7 +622,7 @@ class Episode extends Entity
|
||||
helper('rss');
|
||||
|
||||
$customXML = simplexml_load_string(
|
||||
'<?xml version="1.0" encoding="utf-8"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"><channel><item>' .
|
||||
'<?xml version="1.0" encoding="utf-8"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://podcastindex.org/namespace/1.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"><channel><item>' .
|
||||
$customRssString .
|
||||
'</item></channel></rss>',
|
||||
);
|
||||
|
@ -642,7 +642,7 @@ class Podcast extends Entity
|
||||
helper('rss');
|
||||
|
||||
$xmlNode = (new SimpleRSSElement(
|
||||
'<?xml version="1.0" encoding="utf-8"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"/>',
|
||||
'<?xml version="1.0" encoding="utf-8"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://podcastindex.org/namespace/1.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"/>',
|
||||
))->addChild('channel');
|
||||
array_to_rss([
|
||||
'elements' => $this->custom_rss,
|
||||
@ -664,7 +664,7 @@ class Podcast extends Entity
|
||||
helper('rss');
|
||||
$customRssArray = rss_to_array(
|
||||
simplexml_load_string(
|
||||
'<?xml version="1.0" encoding="utf-8"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"><channel>' .
|
||||
'<?xml version="1.0" encoding="utf-8"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://podcastindex.org/namespace/1.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"><channel>' .
|
||||
$customRssString .
|
||||
'</channel></rss>',
|
||||
),
|
||||
|
@ -35,8 +35,7 @@ if (! function_exists('get_rss_feed')) {
|
||||
|
||||
$itunesNamespace = 'http://www.itunes.com/dtds/podcast-1.0.dtd';
|
||||
|
||||
$podcastNamespace =
|
||||
'https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md';
|
||||
$podcastNamespace = 'https://podcastindex.org/namespace/1.0';
|
||||
|
||||
$atomNamespace = 'http://www.w3.org/2005/Atom';
|
||||
|
||||
@ -450,11 +449,7 @@ if (! function_exists('rss_to_array')) {
|
||||
*/
|
||||
function rss_to_array(SimpleXMLElement $rssNode): array
|
||||
{
|
||||
$nameSpaces = [
|
||||
'',
|
||||
'http://www.itunes.com/dtds/podcast-1.0.dtd',
|
||||
'https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md',
|
||||
];
|
||||
$nameSpaces = ['', 'http://www.itunes.com/dtds/podcast-1.0.dtd', 'https://podcastindex.org/namespace/1.0'];
|
||||
$arrayNode = [];
|
||||
$arrayNode['name'] = $rssNode->getName();
|
||||
$arrayNode['namespace'] = $rssNode->getNamespaces(false);
|
||||
|
@ -500,7 +500,7 @@ class PodcastModel extends Model
|
||||
* @param mixed[] $data
|
||||
*
|
||||
* Sets the UUIDv5 for a podcast. For more information, see
|
||||
* https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#guid
|
||||
* https://podcastindex.org/namespace/1.0#guid
|
||||
*
|
||||
* @return mixed[]
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user