diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 69e68bd0f55dcc1c1d8e3be9a7bd854c19f6d3bb..01530037374dd01113d099a877f4ace0c6f1de31 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -185,11 +185,13 @@ $routes->group('@(:podcastHandle)', static function ($routes): void { }); }); $routes->head('feed.xml', 'FeedController/$1', [ - 'as' => 'podcast_feed', + 'as' => 'podcast-rss-feed', ]); $routes->get('feed.xml', 'FeedController/$1', [ - 'as' => 'podcast_feed', + 'as' => 'podcast-rss-feed', ]); + $routes->head('feed', 'FeedController/$1'); + $routes->get('feed', 'FeedController/$1'); }); // Other pages diff --git a/app/Entities/Podcast.php b/app/Entities/Podcast.php index 9472a5c707068def651e3143803e0d8e37bed00e..22e5d3b17d75f561e79d1e2a4981e7007d52679c 100644 --- a/app/Entities/Podcast.php +++ b/app/Entities/Podcast.php @@ -324,7 +324,7 @@ class Podcast extends Entity public function getFeedUrl(): string { - return url_to('podcast_feed', $this->attributes['handle']); + return url_to('podcast-rss-feed', $this->attributes['handle']); } /** diff --git a/app/Models/PodcastModel.php b/app/Models/PodcastModel.php index af3098d2206bf845ec52bf145f44f4d83c5a7bc9..78d52672d00c2a1674ff09ede849ec2ba458d498 100644 --- a/app/Models/PodcastModel.php +++ b/app/Models/PodcastModel.php @@ -550,7 +550,7 @@ class PodcastModel extends Model { if (! array_key_exists('guid', $data['data']) || $data['data']['guid'] === null) { helper('misc'); - $data['data']['guid'] = podcast_uuid(url_to('podcast_feed', $data['data']['handle'])); + $data['data']['guid'] = podcast_uuid(url_to('podcast-rss-feed', $data['data']['handle'])); } return $data; diff --git a/modules/Admin/Controllers/PodcastImportController.php b/modules/Admin/Controllers/PodcastImportController.php index 3433a9b78cd0241774df80a766d9fde50ffc996e..39b0f09a9a7a0581fe87d5d09e299531c0f6ccfd 100644 --- a/modules/Admin/Controllers/PodcastImportController.php +++ b/modules/Admin/Controllers/PodcastImportController.php @@ -143,7 +143,7 @@ class PodcastImportController extends BaseController 'guid' => $guid, 'handle' => $this->request->getPost('handle'), 'imported_feed_url' => $this->request->getPost('imported_feed_url'), - 'new_feed_url' => url_to('podcast_feed', $this->request->getPost('handle')), + 'new_feed_url' => url_to('podcast-rss-feed', $this->request->getPost('handle')), 'title' => (string) $feed->channel[0]->title, 'description_markdown' => $converter->convert($channelDescriptionHtml), 'description_html' => $channelDescriptionHtml, diff --git a/themes/cp_app/podcast/_partials/sidebar.php b/themes/cp_app/podcast/_partials/sidebar.php index 842eb22d0e23cc2004f869a44d3839704649af1f..ead51a4bd64a95eaa09daae3a648449ee80595f8 100644 --- a/themes/cp_app/podcast/_partials/sidebar.php +++ b/themes/cp_app/podcast/_partials/sidebar.php @@ -1,7 +1,7 @@ <div data-sidebar-toggler="backdrop" class="absolute top-0 left-0 z-10 hidden w-full h-full bg-backdrop/75 md:hidden" role="button" tabIndex="0" aria-label="<?= lang('Common.close') ?>"></div> <aside id="podcast-sidebar" data-sidebar-toggler="sidebar" data-toggle-class="hidden" data-hide-class="hidden" class="z-20 hidden h-full col-span-1 col-start-2 row-start-1 p-4 py-6 shadow-2xl md:shadow-none md:block bg-base"> <div class="sticky z-10 bg-base top-12"> - <a href="<?= route_to('podcast_feed', esc($podcast->handle)) ?>" class="inline-flex items-center mb-6 text-sm font-semibold focus:ring-accent text-skin-muted hover:text-skin-base group" target="_blank" rel="noopener noreferrer"> + <a href="<?= $podcast->feed_url ?>" class="inline-flex items-center mb-6 text-sm font-semibold focus:ring-accent text-skin-muted hover:text-skin-base group" target="_blank" rel="noopener noreferrer"> <?= icon('rss', ' mr-2 bg-orange-500 text-xl text-white group-hover:bg-orange-700 p-1 w-6 h-6 inline-flex items-center justify-center rounded-lg') . lang('Podcast.feed') ?> </a> <?php if (