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