mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-04 07:19:03 +02:00
- refactor episode, podcast and category entities to add dynamic properties - refactor Routes when adding feed route - update migration files to better fit itunes' and rss' specs - update podcast and episode forms - add SimpleRSSElement class to Libraries - add rss_helper - update home controller to redirect if system has only one podcast
22 lines
514 B
PHP
22 lines
514 B
PHP
<?php
|
|
|
|
namespace App\Controllers;
|
|
|
|
use App\Models\PodcastModel;
|
|
use CodeIgniter\Controller;
|
|
|
|
class Feed extends Controller
|
|
{
|
|
public function index($podcast_name)
|
|
{
|
|
helper('rss');
|
|
|
|
$podcast_model = new PodcastModel();
|
|
$podcast = $podcast_model->where('name', $podcast_name)->first();
|
|
|
|
// The page cache is set to a decade so it is deleted manually upon podcast update
|
|
$this->cachePage(DECADE);
|
|
|
|
return $this->response->setXML(get_rss_feed($podcast));
|
|
}
|
|
}
|