Merge
This commit is contained in:
@@ -43,8 +43,13 @@ QUERY;
|
|||||||
* RSS-feed van alle podcasts
|
* RSS-feed van alle podcasts
|
||||||
*/
|
*/
|
||||||
public function rss(Request $request) {
|
public function rss(Request $request) {
|
||||||
$podcasts = $this->retrievePodcasts($page = 1, $count = 20, $filter = null, $params = []);
|
$page = (int)$request->get('page', 1);
|
||||||
$view = view('rss.podcasts')->with('podcasts', $podcasts);
|
if($page <= 0) {
|
||||||
|
return abort(400);
|
||||||
|
}
|
||||||
|
|
||||||
|
$podcasts = $this->retrievePodcasts($page, $count = 20, $filter = null, $params = []);
|
||||||
|
$view = view('rss.podcasts')->with('podcasts', $podcasts)->with('url', $request->url())->with('page', $page);
|
||||||
return response($view)->header('Content-Type', 'application/xml');
|
return response($view)->header('Content-Type', 'application/xml');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,37 +4,51 @@
|
|||||||
xmlns:spotify="http://www.spotify.com/ns/rss"
|
xmlns:spotify="http://www.spotify.com/ns/rss"
|
||||||
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
|
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
|
||||||
|
|
||||||
<channel>
|
<channel>
|
||||||
<title>NH Gooi Gemist</title>
|
<title>NH Gooi Gemist</title>
|
||||||
<description>Fragmenten en interviews eerder te horen op NH Gooi Radio</description>
|
<description>Fragmenten en interviews eerder te horen op NH Gooi Radio</description>
|
||||||
<link>https://nhgooi.nl</link>
|
<link>https://nhgooi.nl</link>
|
||||||
<language>nl-nl</language>
|
<language>nl-nl</language>
|
||||||
<itunes:author>NH Gooi Radio</itunes:author>
|
|
||||||
<itunes:explicit>no</itunes:explicit>
|
<link rel="first" href="{{$url}}?page=1"/>
|
||||||
<itunes:image href="https://nhgooi.nl/images/logo.png" />
|
<link rel="next" href="{{$url}}?page={{$page + 1}}"/>
|
||||||
<itunes:owner>
|
@if($page != 1)
|
||||||
<itunes:email>info@nhgooi.nl</itunes:email>
|
<link rel="previous" href="{{$url}}?page={{$page - 1}}"/>
|
||||||
</itunes:owner>
|
@endif
|
||||||
<itunes:category text="News & Politics"></itunes:category>
|
|
||||||
<spotify:countryOfOrigin>nl</spotify:countryOfOrigin><spotify:countryOfOrigin>nl</spotify:countryOfOrigin>
|
|
||||||
|
|
||||||
@foreach($podcasts as $podcast)
|
|
||||||
<item>
|
|
||||||
<title>{{$podcast->title}}</title>
|
|
||||||
<itunes:summary>{{$podcast->content}}</itunes:summary>
|
|
||||||
<description>{{$podcast->content}}</description>
|
|
||||||
<link>https://nhgooi.nl/podcast/download/{{$podcast->url}}</link>
|
|
||||||
<pubDate>{{$podcast->created->format('r')}}</pubDate>
|
|
||||||
<itunes:author>NH Gooi Radio</itunes:author>
|
<itunes:author>NH Gooi Radio</itunes:author>
|
||||||
<itunes:duration>{{$podcast->formatDuration()}}</itunes:duration>
|
|
||||||
<itunes:explicit>no</itunes:explicit>
|
<itunes:explicit>no</itunes:explicit>
|
||||||
|
<itunes:image href="https://nhgooi.nl/images/logo.png" />
|
||||||
|
<itunes:owner>
|
||||||
|
<itunes:name>NH Gooi Radio</itunes:name>
|
||||||
|
<itunes:email>info@nhgooi.nl</itunes:email>
|
||||||
|
</itunes:owner>
|
||||||
|
<itunes:category text="News">
|
||||||
|
<itunes:category text="Politics" />
|
||||||
|
<itunes:category text="News Commentary" />
|
||||||
|
</itunes:category>
|
||||||
|
<spotify:countryOfOrigin>nl</spotify:countryOfOrigin>
|
||||||
|
|
||||||
|
@foreach($podcasts as $podcast)
|
||||||
|
<item>
|
||||||
|
<guid>https://nhgooi.nl/podcast-{{$podcast->id}}</guid>
|
||||||
|
<title>{{$podcast->title}}</title>
|
||||||
|
<description>{{$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>
|
||||||
|
<pubDate>{{$podcast->created->format('r')}}</pubDate>
|
||||||
|
|
||||||
|
<itunes:title>{{$podcast->title}}</itunes:title>
|
||||||
|
<itunes:author>NH Gooi Radio</itunes:author>
|
||||||
|
<itunes:summary>{{$podcast->content}}</itunes:summary>
|
||||||
|
<itunes:duration>{{$podcast->formatDuration()}}</itunes:duration>
|
||||||
|
<itunes:explicit>no</itunes:explicit>
|
||||||
@if($podcast->image)
|
@if($podcast->image)
|
||||||
<itunes:image href="https://nhgooi.nl{{$podcast->image->url}}"/>
|
<itunes:image href="https://nhgooi.nl{{$podcast->image->url}}"/>
|
||||||
@endif
|
@endif
|
||||||
<guid>https://nhgooi.nl/podcast-{{$podcast->id}}</guid>
|
</item>
|
||||||
</item>
|
@endforeach
|
||||||
@endforeach
|
|
||||||
|
</channel>
|
||||||
</channel>
|
|
||||||
</rss>
|
</rss>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user