diff --git a/api/app/Http/Controllers/PodcastController.php b/api/app/Http/Controllers/PodcastController.php index 2deb342..498473b 100644 --- a/api/app/Http/Controllers/PodcastController.php +++ b/api/app/Http/Controllers/PodcastController.php @@ -43,8 +43,13 @@ QUERY; * RSS-feed van alle podcasts */ public function rss(Request $request) { - $podcasts = $this->retrievePodcasts($page = 1, $count = 20, $filter = null, $params = []); - $view = view('rss.podcasts')->with('podcasts', $podcasts); + $page = (int)$request->get('page', 1); + 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'); } diff --git a/api/resources/views/rss/podcasts.blade.php b/api/resources/views/rss/podcasts.blade.php index fa81058..b37f701 100644 --- a/api/resources/views/rss/podcasts.blade.php +++ b/api/resources/views/rss/podcasts.blade.php @@ -4,37 +4,51 @@ xmlns:spotify="http://www.spotify.com/ns/rss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"> - -NH Gooi Gemist -Fragmenten en interviews eerder te horen op NH Gooi Radio -https://nhgooi.nl -nl-nl -NH Gooi Radio -no - - - info@nhgooi.nl - - -nlnl + + NH Gooi Gemist + Fragmenten en interviews eerder te horen op NH Gooi Radio + https://nhgooi.nl + nl-nl + + + +@if($page != 1) + +@endif -@foreach($podcasts as $podcast) - - {{$podcast->title}} - {{$podcast->content}} - {{$podcast->content}} - https://nhgooi.nl/podcast/download/{{$podcast->url}} - {{$podcast->created->format('r')}} NH Gooi Radio - {{$podcast->formatDuration()}} no + + + NH Gooi Radio + info@nhgooi.nl + + + + + + nl + + @foreach($podcasts as $podcast) + + https://nhgooi.nl/podcast-{{$podcast->id}} + {{$podcast->title}} + {{$podcast->content}} + https://nhgooi.nl/gemist/fragment/{{$podcast->url}} + + {{$podcast->created->format('r')}} + + {{$podcast->title}} + NH Gooi Radio + {{$podcast->content}} + {{$podcast->formatDuration()}} + no @if($podcast->image) - + @endif - https://nhgooi.nl/podcast-{{$podcast->id}} - -@endforeach - - + + @endforeach + +