mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 00:01:21 +00:00
Cleanup unused code
This commit is contained in:
@@ -1,122 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Category;
|
||||
use Blacklight\AniDB;
|
||||
use Blacklight\Releases;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AnimeController extends BasePageController
|
||||
{
|
||||
/**
|
||||
* @var AniDB
|
||||
*/
|
||||
protected $aniDb;
|
||||
|
||||
/**
|
||||
* @var Releases
|
||||
*/
|
||||
protected $releases;
|
||||
|
||||
/**
|
||||
* AnimeController constructor.
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->aniDb = new AniDB;
|
||||
$this->releases = new Releases;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function showAnime(Request $request): void
|
||||
{
|
||||
|
||||
if ($request->has('id') && ctype_digit($request->input('id'))) {
|
||||
// force the category to TV_ANIME as it should be for anime, as $catarray was NULL and we know the category for sure for anime
|
||||
$aniDbReleases = $this->releases->animeSearch($request->input('id'), 0, 1000, '', [Category::TV_ANIME], -1);
|
||||
$aniDbInfo = $this->aniDb->getAnimeInfo($request->input('id'));
|
||||
$title = $aniDbInfo->title;
|
||||
$meta_title = 'View Anime '.$aniDbInfo->title;
|
||||
$meta_keywords = 'view,anime,anidb,description,details';
|
||||
$meta_description = 'View '.$aniDbInfo->title.' Anime';
|
||||
|
||||
if (! $this->releases && ! $aniDbInfo) {
|
||||
$this->smarty->assign('nodata', 'No releases and AniDB info for this series.');
|
||||
} elseif (! $aniDbInfo) {
|
||||
$this->smarty->assign('nodata', 'No AniDB information for this series.');
|
||||
} elseif (! $aniDbReleases) {
|
||||
$this->smarty->assign('nodata', 'No releases for this series.');
|
||||
} else {
|
||||
$this->smarty->assign('animeEpisodeTitles', $aniDbReleases);
|
||||
$this->smarty->assign([
|
||||
'animeAnidbid' => $aniDbInfo->anidbid,
|
||||
'animeTitle' => $aniDbInfo->title,
|
||||
'animeType' => $aniDbInfo->type,
|
||||
'animePicture' => $aniDbInfo->picture,
|
||||
'animeStartDate' => $aniDbInfo->startdate,
|
||||
'animeEndDate' => $aniDbInfo->enddate,
|
||||
'animeDescription' => $aniDbInfo->description,
|
||||
'animeRating' => $aniDbInfo->rating,
|
||||
'animeRelated' => $aniDbInfo->related,
|
||||
'animeSimilar' => $aniDbInfo->similar,
|
||||
'animeCategories' => $aniDbInfo->categories,
|
||||
'animeCreators' => $aniDbInfo->creators,
|
||||
'animeCharacters' => $aniDbInfo->characters,
|
||||
]);
|
||||
|
||||
$this->smarty->assign('nodata', '');
|
||||
}
|
||||
$content = $this->smarty->fetch('viewanime.tpl');
|
||||
$this->smarty->assign(compact('content', 'title', 'meta_title', 'meta_keywords', 'meta_description'));
|
||||
$this->pagerender();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function showList(Request $request): void
|
||||
{
|
||||
$letter = ($request->has('id') && preg_match('/^(0\-9|[A-Z])$/i', $request->input('id'))) ? $request->input('id') : '0-9';
|
||||
|
||||
$animeTitle = ($request->has('title') && ! empty($request->input('title'))) ? $request->input('title') : '';
|
||||
|
||||
if ($animeTitle !== '' && $request->missing('id')) {
|
||||
$letter = '';
|
||||
}
|
||||
|
||||
$masterserieslist = $this->aniDb->getAnimeList($letter, $animeTitle);
|
||||
|
||||
$title = 'Anime List';
|
||||
$meta_title = 'View Anime List';
|
||||
$meta_keywords = 'view,anime,series,description,details';
|
||||
$meta_description = 'View Anime List';
|
||||
|
||||
$animelist = [];
|
||||
foreach ($masterserieslist as $s) {
|
||||
if (preg_match('/^[0-9]/', $s->title)) {
|
||||
$thisrange = '0-9';
|
||||
} else {
|
||||
preg_match('/([A-Z]).*/i', $s->title, $hits);
|
||||
$thisrange = strtoupper($hits[1]);
|
||||
}
|
||||
$animelist[$thisrange][] = $s;
|
||||
}
|
||||
ksort($animelist);
|
||||
|
||||
$this->smarty->assign('animelist', $animelist);
|
||||
$this->smarty->assign('animerange', range('A', 'Z'));
|
||||
$this->smarty->assign('animeletter', $letter);
|
||||
$this->smarty->assign('animetitle', $animeTitle);
|
||||
$content = $this->smarty->fetch('viewanimelist.tpl');
|
||||
|
||||
$this->smarty->assign(compact('content', 'title', 'meta_title', 'meta_keywords', 'meta_description'));
|
||||
$this->pagerender();
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Release;
|
||||
use Blacklight\NZB;
|
||||
|
||||
class FileListController extends BasePageController
|
||||
{
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function show(string $guid): void
|
||||
{
|
||||
$nzb = new NZB;
|
||||
|
||||
if ($guid !== null) {
|
||||
$rel = Release::getByGuid($guid);
|
||||
if (! $rel) {
|
||||
$this->show404();
|
||||
}
|
||||
|
||||
$nzbpath = $nzb->NZBPath($guid);
|
||||
|
||||
if (! file_exists($nzbpath)) {
|
||||
$this->show404();
|
||||
}
|
||||
|
||||
ob_start();
|
||||
@readgzfile($nzbpath);
|
||||
$nzbfile = ob_get_clean();
|
||||
|
||||
$ret = $nzb->nzbFileList($nzbfile);
|
||||
|
||||
$this->smarty->assign('rel', $rel);
|
||||
$this->smarty->assign('files', $ret);
|
||||
|
||||
$title = 'File List';
|
||||
$meta_title = 'View Nzb file list';
|
||||
$meta_keywords = 'view,nzb,file,list,description,details';
|
||||
$meta_description = 'View Nzb File List';
|
||||
|
||||
$content = $this->smarty->fetch('viewfilelist.tpl');
|
||||
|
||||
$this->smarty->assign(
|
||||
compact('title', 'content', 'meta_title', 'meta_keywords', 'meta_description')
|
||||
);
|
||||
$this->pagerender();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -141,10 +141,6 @@
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/DariusIII/html"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/DariusIII/Laravel.Smarty"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/DariusIII/tmdbapi"
|
||||
|
||||
Generated
+1
-1
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "2f53c39b73b71bb0763232030d050191",
|
||||
"content-hash": "98e2c05b8152c21cf55c8986509cf527",
|
||||
"packages": [
|
||||
{
|
||||
"name": "aharen/omdbapi",
|
||||
|
||||
@@ -1,194 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the MIT license.
|
||||
*
|
||||
* Copyright (c) 2014-2017 Yuuki Takezawa
|
||||
*/
|
||||
|
||||
/*
|
||||
* Smarty configure.
|
||||
* @author yuuki.takezawa<yuuki.takezawa@comnect.jp.net>
|
||||
* @license http://opensource.org/licenses/MIT MIT
|
||||
*/
|
||||
return [
|
||||
|
||||
// smarty file extension
|
||||
'extension' => 'tpl',
|
||||
|
||||
//
|
||||
'debugging' => env('SMARTY_DEBUG', false),
|
||||
|
||||
// use cache
|
||||
'caching' => env('SMARTY_CACHING', false),
|
||||
|
||||
//
|
||||
'cache_lifetime' => env('SMARTY_CACHE_LIFE', 120),
|
||||
|
||||
//
|
||||
'compile_check' => env('SMARTY_COMPILE_CHECK', false),
|
||||
|
||||
// delimiters
|
||||
// default "{$smarty}"
|
||||
'left_delimiter' => '{',
|
||||
'right_delimiter' => '}',
|
||||
|
||||
// path info
|
||||
'template_path' => base_path().'/resources/views/themes',
|
||||
|
||||
// smarty cache directory
|
||||
'cache_path' => storage_path().'/framework/smarty/cache',
|
||||
|
||||
// smarty template compiler
|
||||
'compile_path' => storage_path().'/framework/smarty/templates_c',
|
||||
|
||||
// smarty plugins
|
||||
'plugins_paths' => [
|
||||
base_path().'/vendor/smarty/libs/plugins/',
|
||||
base_path().'/resources/smarty/plugins/',
|
||||
|
||||
],
|
||||
|
||||
// smarty configure
|
||||
'config_paths' => [
|
||||
base_path().'/resources/smarty/config',
|
||||
],
|
||||
|
||||
/*
|
||||
* for develop true
|
||||
* for production false
|
||||
*/
|
||||
'force_compile' => env('SMARTY_FORCE_COMPILE', false),
|
||||
|
||||
// smarty cache driver "file", "memcached", "redis"
|
||||
'cache_driver' => env('SMARTY_CACHE_DRIVER', 'file'),
|
||||
|
||||
// memcached servers
|
||||
'memcached' => [
|
||||
[
|
||||
'host' => '127.0.0.1',
|
||||
'port' => 11211,
|
||||
'weight' => 100,
|
||||
],
|
||||
],
|
||||
|
||||
// redis configure
|
||||
'redis' => [
|
||||
[
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => 0,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
* All smarty config properties are available below
|
||||
* Leave settings commented to use smarty's default values
|
||||
* See smarty docs for usage
|
||||
*/
|
||||
|
||||
// 'auto_literal' => null,
|
||||
// 'error_unassigned' => null,
|
||||
// 'use_include_path' => null,
|
||||
// 'joined_template_dir' => null,
|
||||
// 'joined_config_dir' => null,
|
||||
// 'default_template_handler_func' => null,
|
||||
// 'default_config_handler_func' => null,
|
||||
// 'default_plugin_handler_func' => null,
|
||||
// 'use_sub_dirs' => null,
|
||||
// 'allow_ambiguous_resources' => null,
|
||||
// 'merge_compiled_includes' => null,
|
||||
// 'inheritance_merge_compiled_includes' => null,
|
||||
// 'force_cache' => null,
|
||||
// 'security_class' => null,
|
||||
// 'php_handling' => null,
|
||||
// 'allow_php_templates' => null,
|
||||
// 'direct_access_security' => null,
|
||||
// 'debugging_ctrl' => null,
|
||||
// 'smarty_debug_id' => null,
|
||||
// 'debug_tpl' => null,
|
||||
// 'error_reporting' => null,
|
||||
// 'get_used_tags' => null,
|
||||
// 'config_overwrite' => null,
|
||||
// 'config_booleanize' => null,
|
||||
// 'config_read_hidden' => null,
|
||||
// 'compile_locking' => null,
|
||||
// 'cache_locking' => null,
|
||||
// 'locking_timeout' => null,
|
||||
// 'default_resource_type' => null,
|
||||
// 'caching_type' => null,
|
||||
// 'properties' => null,
|
||||
// 'default_config_type' => null,
|
||||
// 'source_objects' => null,
|
||||
// 'template_objects' => null,
|
||||
// 'resource_caching' => null,
|
||||
// 'template_resource_caching' => null,
|
||||
// 'cache_modified_check' => null,
|
||||
// 'registered_plugins' => null,
|
||||
// 'plugin_search_order' => null,
|
||||
// 'registered_objects' => null,
|
||||
// 'registered_classes' => null,
|
||||
// 'registered_filters' => null,
|
||||
// 'registered_resources' => null,
|
||||
// '_resource_handlers' => null,
|
||||
// 'registered_cache_resources' => null,
|
||||
// '_cacheresource_handlers' => null,
|
||||
// 'autoload_filters' => null,
|
||||
// 'default_modifiers' => null,
|
||||
// 'escape_html' => null,
|
||||
// 'start_time' => null,
|
||||
// '_file_perms' => null,
|
||||
// '_dir_perms' => null,
|
||||
// '_tag_stack' => null,
|
||||
// '_current_file' => null,
|
||||
// '_parserdebug' => null,
|
||||
// '_is_file_cache' => null,
|
||||
// 'cache_id' => null,
|
||||
// 'compile_id' => null,
|
||||
// 'template_class' => null,
|
||||
// 'tpl_vars' => null,
|
||||
// 'parent' => null,
|
||||
// 'config_vars' => null,
|
||||
|
||||
/*
|
||||
* If true smarty will enable security `$smarty->enableSecurity()`
|
||||
*/
|
||||
// 'enable_security' => false,
|
||||
|
||||
/*
|
||||
* The following settings will be applied to the smarty security policy object `$smarty->security_policy`
|
||||
* Ignored if enable_security == false
|
||||
*/
|
||||
|
||||
// 'security_policy' => [
|
||||
// 'php_handling' => null,
|
||||
// 'secure_dir' => null,
|
||||
// 'trusted_dir' => null,
|
||||
// 'trusted_uri' => null,
|
||||
// 'trusted_constants' => null,
|
||||
// 'static_classes' => null,
|
||||
// 'trusted_static_methods' => null,
|
||||
// 'trusted_static_properties' => null,
|
||||
// 'php_functions' => null,
|
||||
// 'php_modifiers' => null,
|
||||
// 'allowed_tags' => null,
|
||||
// 'disabled_tags' => null,
|
||||
// 'allowed_modifiers' => null,
|
||||
// 'disabled_modifiers' => null,
|
||||
// 'disabled_special_smarty_vars' => null,
|
||||
// 'streams' => null,
|
||||
// 'allow_constants' => null,
|
||||
// 'allow_super_globals' => null,
|
||||
// 'max_template_nesting' => null,
|
||||
// ]
|
||||
|
||||
];
|
||||
@@ -21,7 +21,6 @@
|
||||
<a href="{{ url('/browse/' . $parentcat['title']) }}" class="block px-4 py-2 text-sm text-gray-300 dark:text-gray-400 hover:bg-gray-800 dark:hover:bg-gray-800 hover:text-white dark:hover:text-white">All TV</a>
|
||||
<div class="border-t border-gray-700 dark:border-gray-600"></div>
|
||||
<a href="{{ route('series') }}" class="block px-4 py-2 text-sm text-gray-300 dark:text-gray-400 hover:bg-gray-800 dark:hover:bg-gray-800 hover:text-white dark:hover:text-white">TV Series</a>
|
||||
<a href="{{ route('animelist') }}" class="block px-4 py-2 text-sm text-gray-300 dark:text-gray-400 hover:bg-gray-800 dark:hover:bg-gray-800 hover:text-white dark:hover:text-white">Anime Series</a>
|
||||
<div class="border-t border-gray-700 dark:border-gray-600"></div>
|
||||
@foreach($parentcat['categories'] as $subcat)
|
||||
<a href="{{ url('/browse/TV/' . $subcat['title']) }}" class="block px-4 py-2 text-sm text-gray-300 dark:text-gray-400 hover:bg-gray-800 dark:hover:bg-gray-800 hover:text-white dark:hover:text-white">{{ $subcat['title'] }}</a>
|
||||
|
||||
@@ -36,10 +36,8 @@ use App\Http\Controllers\Admin\AdminSiteController;
|
||||
use App\Http\Controllers\Admin\AdminTmuxController;
|
||||
use App\Http\Controllers\Admin\AdminUserController;
|
||||
use App\Http\Controllers\Admin\DeletedUsersController;
|
||||
use App\Http\Controllers\Admin\SystemMetricsController;
|
||||
use App\Http\Controllers\AdultController;
|
||||
use App\Http\Controllers\AjaxController;
|
||||
use App\Http\Controllers\AnimeController;
|
||||
use App\Http\Controllers\ApiHelpController;
|
||||
use App\Http\Controllers\Auth\ForgotPasswordController;
|
||||
use App\Http\Controllers\Auth\LoginController;
|
||||
@@ -55,7 +53,6 @@ use App\Http\Controllers\ContactUsController;
|
||||
use App\Http\Controllers\ContentController;
|
||||
use App\Http\Controllers\DetailsController;
|
||||
use App\Http\Controllers\FailedReleasesController;
|
||||
use App\Http\Controllers\FileListController;
|
||||
use App\Http\Controllers\GamesController;
|
||||
use App\Http\Controllers\GetNzbController;
|
||||
use App\Http\Controllers\InvitationController;
|
||||
@@ -137,8 +134,6 @@ Route::middleware('isVerified')->group(function () {
|
||||
Route::match(['GET', 'POST'], 'Audio/{id?}', [MusicController::class, 'show'])->name('Audio');
|
||||
Route::match(['GET', 'POST'], 'Console/{id?}', [ConsoleController::class, 'show'])->name('Console');
|
||||
Route::match(['GET', 'POST'], 'XXX/{id?}', [AdultController::class, 'show'])->name('XXX');
|
||||
Route::match(['GET', 'POST'], 'anime', [AnimeController::class, 'showAnime'])->name('anime');
|
||||
Route::match(['GET', 'POST'], 'animelist', [AnimeController::class, 'showList'])->name('animelist');
|
||||
Route::match(['GET', 'POST'], 'Books/{id?}', [BooksController::class, 'index'])->name('Books');
|
||||
});
|
||||
|
||||
@@ -153,7 +148,6 @@ Route::middleware('isVerified')->group(function () {
|
||||
Route::match(['GET', 'POST'], 'mymovies', [MyMoviesController::class, 'show'])->name('mymovies');
|
||||
Route::match(['GET', 'POST'], 'myshows', [MyShowsController::class, 'show'])->name('myshows');
|
||||
Route::match(['GET', 'POST'], 'myshows/browse', [MyShowsController::class, 'browse'])->name('myshows.browse');
|
||||
Route::match(['GET', 'POST'], 'filelist/{guid}', [FileListController::class, 'show'])->name('filelist');
|
||||
Route::get('api/release/{guid}/filelist', [\App\Http\Controllers\Api\FileListApiController::class, 'getFileList'])->name('api.filelist');
|
||||
Route::match(['GET', 'POST'], 'series/{id?}', [SeriesController::class, 'index'])->name('series');
|
||||
Route::match(['GET', 'POST'], 'trending-tv', [SeriesController::class, 'showTrending'])->name('trending-tv');
|
||||
|
||||
Reference in New Issue
Block a user