diff --git a/app/Http/Controllers/RssController.php b/app/Http/Controllers/RssController.php index f23a00488..5d2a27919 100644 --- a/app/Http/Controllers/RssController.php +++ b/app/Http/Controllers/RssController.php @@ -91,51 +91,37 @@ class RssController extends BasePageController /** * @throws \Exception */ - public function showRssDesc(): void + public function showRssDesc() { $this->setPreferences(); $rss = new RSS; - $title = 'Rss Info'; - $meta_title = 'Rss Nzb Info'; - $meta_keywords = 'view,nzb,description,details,rss,atom'; - $meta_description = 'View information about NNTmux RSS Feeds.'; - $firstShow = $rss->getFirstInstance('videos_id', 'releases', 'id'); $firstAni = $rss->getFirstInstance('anidbid', 'releases', 'id'); - if ($firstShow !== null) { - $this->smarty->assign('show', $firstShow->videos_id); - } else { - $this->smarty->assign('show', 1); - } - - if ($firstAni !== null) { - $this->smarty->assign('anidb', $firstAni->anidbid); - } else { - $this->smarty->assign('anidb', 1); - } + $show = ($firstShow !== null) ? $firstShow->videos_id : 1; + $anidb = ($firstAni !== null) ? $firstAni->anidbid : 1; $catExclusions = $this->userdata->categoryexclusions ?? []; - $this->smarty->assign( - [ - 'categorylist' => Category::getCategories(true, $catExclusions), - 'parentcategorylist' => Category::getForMenu($catExclusions), - ] - ); + $this->viewData = array_merge($this->viewData, [ + 'show' => $show, + 'anidb' => $anidb, + 'categorylist' => Category::getCategories(true, $catExclusions), + 'parentcategorylist' => Category::getForMenu($catExclusions), + 'title' => 'Rss Info', + 'meta_title' => 'Rss Nzb Info', + 'meta_keywords' => 'view,nzb,description,details,rss,atom', + 'meta_description' => 'View information about NNTmux RSS Feeds.', + ]); - $content = $this->smarty->fetch('rssdesc.tpl'); - $this->smarty->assign( - compact('content', 'title', 'meta_title', 'meta_keywords', 'meta_description') - ); - $this->pagerender(); + return view('rss.rssdesc', $this->viewData); } /** * @throws \Throwable */ - public function cartRss(Request $request): JsonResponse|array + public function cartRss(Request $request) { $rss = new RSS; $offset = 0; @@ -161,7 +147,7 @@ class RssController extends BasePageController /** * @throws \Throwable */ - public function categoryFeedRss(Request $request): JsonResponse|array + public function categoryFeedRss(Request $request) { $rss = new RSS; $offset = 0; diff --git a/resources/views/rss/rssdesc.blade.php b/resources/views/rss/rssdesc.blade.php new file mode 100644 index 000000000..50b2a8b39 --- /dev/null +++ b/resources/views/rss/rssdesc.blade.php @@ -0,0 +1,263 @@ +@extends('layouts.main') + +@section('content') +
+ Here you can find RSS feeds for various categories and content types. These feeds provide either descriptions or + direct NZB downloads based on your preferences. +
+ + @if($loggedin ?? false) +| Parameter | +Description | +Example | +
|---|---|---|
api_token |
+ Add this to your feed URL to allow NZB downloads without logging in | +&api_token={{ $userdata->api_token ?? 'YOUR_TOKEN' }} |
+
del=1 |
+ Remove NZB from your cart after download | +&del=1 |
+
dl=1 |
+ Change the default link to download an NZB | +&dl=1 |
+
num=50 |
+ Change the number of results returned (default: 25, max: 100) | +&num=50 |
+
airdate=20 |
+ Return TV shows only aired in the last x days (default: all) | +&airdate=20 |
+