Podcast links gefixt

This commit is contained in:
2020-10-17 08:39:42 +02:00
parent e7b207065f
commit 2b6224c054
3 changed files with 4 additions and 3 deletions

View File

@@ -310,12 +310,12 @@ QUERY
if($externalId = (int)$item['data']->external_id) {
try {
$externalSource = json_decode(file_get_contents($this->EXTERNAL_NEWS_API . 'news?source=api&externalid=' . (int)$externalId));
$externalSource = json_decode(file_get_contents($url = $this->EXTERNAL_NEWS_API . 'news?source=api&externalid=' . (int)$externalId));
if($externalSource) {
$data['version'] = 2;
$data['source'] = $externalSource->news;
}
} catch(\ErrorException $e) {}
} catch(\Exception $ex) { $data['error'] = array('source' => $url, 'exception' => $ex); }
}
return response()->json($data);

View File

@@ -1,3 +1,4 @@
<?php header('Access-Control-Allow-Origin: *'); ?>
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom"

View File

@@ -36,7 +36,7 @@
<title>{{html_entity_decode($podcast->title)}}</title>
<description>{{html_entity_decode($podcast->content)}}</description>
<link>https://nhgooi.nl/gemist/fragment/{{$podcast->url}}</link>
<enclosure url="{{url('podcast/download/' . $podcast->url . '?auth=' . $podcast->auth)}}" type="audio/mpeg" length="{{filesize($podcast->getSoundFile())}}"></enclosure>
<enclosure url="{{url('podcast/download' . $podcast->url . '?auth=' . $podcast->auth)}}" type="audio/mpeg" length="{{filesize($podcast->getSoundFile())}}"></enclosure>
<pubDate>{{$podcast->created->format('r')}}</pubDate>
<itunes:title>{{$podcast->title}}</itunes:title>