mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-23 01:01:20 +00: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
23 lines
514 B
PHP
23 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));
|
|
}
|
|
}
|