@@ -62,7 +62,7 @@ |
||
| 62 | 62 | // convert from a string array to an int array, filtering out empty values |
| 63 | 63 | $books_selected = array_map(fn ($value) => (int) trim($value), array_filter($books_selected)); |
| 64 | 64 | |
| 65 | - $compress_headers_warning = ! str_contains(config('settings.nntp_server'), 'astra') ? 'compress_headers_warning' : ''; |
|
| 65 | + $compress_headers_warning = !str_contains(config('settings.nntp_server'), 'astra') ? 'compress_headers_warning' : ''; |
|
| 66 | 66 | |
| 67 | 67 | $this->viewData = array_merge($this->viewData, [ |
| 68 | 68 | 'error' => $error, |
@@ -40,9 +40,9 @@ discard block |
||
| 40 | 40 | $seriessummary = ''; |
| 41 | 41 | $seriescountry = ''; |
| 42 | 42 | |
| 43 | - if (! $show) { |
|
| 43 | + if (!$show) { |
|
| 44 | 44 | $nodata = 'No video information for this series.'; |
| 45 | - } elseif (! $rel) { |
|
| 45 | + } elseif (!$rel) { |
|
| 46 | 46 | $nodata = 'No releases for this series.'; |
| 47 | 47 | } else { |
| 48 | 48 | $myshows = UserSerie::getShow($this->userdata->id, $show['id']); |
@@ -67,11 +67,11 @@ discard block |
||
| 67 | 67 | $seriestitlesArray = $seriessummaryArray = $seriescountryArray = []; |
| 68 | 68 | $seriestitlesArray[] = $show['title']; |
| 69 | 69 | |
| 70 | - if (! empty($show['summary'])) { |
|
| 70 | + if (!empty($show['summary'])) { |
|
| 71 | 71 | $seriessummaryArray[] = $show['summary']; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - if (! empty($show['countries_id'])) { |
|
| 74 | + if (!empty($show['countries_id'])) { |
|
| 75 | 75 | $seriescountryArray[] = $show['countries_id']; |
| 76 | 76 | } |
| 77 | 77 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $totalSeasonsAired = 0; |
| 92 | 92 | $totalEpisodesAired = 0; |
| 93 | 93 | |
| 94 | - if (! empty($show['id'])) { |
|
| 94 | + if (!empty($show['id'])) { |
|
| 95 | 95 | $episodeStats = \App\Models\TvEpisode::query() |
| 96 | 96 | ->where('videos_id', $show['id']) |
| 97 | 97 | ->whereNotNull('firstaired') |
@@ -100,10 +100,10 @@ discard block |
||
| 100 | 100 | ->first(); |
| 101 | 101 | |
| 102 | 102 | if ($episodeStats) { |
| 103 | - if (! empty($episodeStats->first_aired) && $episodeStats->first_aired != '0000-00-00') { |
|
| 103 | + if (!empty($episodeStats->first_aired) && $episodeStats->first_aired != '0000-00-00') { |
|
| 104 | 104 | $firstEpisodeAired = \Carbon\Carbon::parse($episodeStats->first_aired); |
| 105 | 105 | } |
| 106 | - if (! empty($episodeStats->last_aired) && $episodeStats->last_aired != '0000-00-00') { |
|
| 106 | + if (!empty($episodeStats->last_aired) && $episodeStats->last_aired != '0000-00-00') { |
|
| 107 | 107 | $lastEpisodeAired = \Carbon\Carbon::parse($episodeStats->last_aired); |
| 108 | 108 | } |
| 109 | 109 | $totalSeasonsAired = $episodeStats->total_seasons ?? 0; |
@@ -142,9 +142,9 @@ discard block |
||
| 142 | 142 | } else { |
| 143 | 143 | $letter = ($id && preg_match('/^(0\-9|[A-Z])$/i', $id)) ? $id : '0-9'; |
| 144 | 144 | |
| 145 | - $showname = ($request->has('title') && ! empty($request->input('title'))) ? $request->input('title') : ''; |
|
| 145 | + $showname = ($request->has('title') && !empty($request->input('title'))) ? $request->input('title') : ''; |
|
| 146 | 146 | |
| 147 | - if ($showname !== '' && ! $id) { |
|
| 147 | + if ($showname !== '' && !$id) { |
|
| 148 | 148 | $letter = ''; |
| 149 | 149 | } |
| 150 | 150 | |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | $cacheKey = 'trending_tv_top_15_48h'; |
| 188 | 188 | |
| 189 | 189 | // Get trending TV shows from cache or calculate (refresh every hour) |
| 190 | - $trendingShows = \Illuminate\Support\Facades\Cache::remember($cacheKey, 3600, function () { |
|
| 190 | + $trendingShows = \Illuminate\Support\Facades\Cache::remember($cacheKey, 3600, function() { |
|
| 191 | 191 | // Calculate timestamp for 48 hours ago |
| 192 | 192 | $fortyEightHoursAgo = \Illuminate\Support\Carbon::now()->subHours(48); |
| 193 | 193 | |
@@ -60,12 +60,12 @@ |
||
| 60 | 60 | |
| 61 | 61 | // Then add the converted settings array as 'site' |
| 62 | 62 | // Using array assignment instead of constructor assignment to ensure it persists |
| 63 | - $this->viewData['site'] = $this->settings->map(function ($value) { |
|
| 63 | + $this->viewData['site'] = $this->settings->map(function($value) { |
|
| 64 | 64 | return Settings::convertValue($value); |
| 65 | 65 | })->all(); |
| 66 | 66 | |
| 67 | 67 | // Initialize userdata property for controllers that need it |
| 68 | - $this->middleware(function ($request, $next) { |
|
| 68 | + $this->middleware(function($request, $next) { |
|
| 69 | 69 | if (Auth::check()) { |
| 70 | 70 | $this->userdata = User::find(Auth::id()); |
| 71 | 71 | $this->userdata->categoryexclusions = User::getCategoryExclusionById(Auth::id()); |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | { |
| 16 | 16 | $movie = new Movie(['Settings' => $this->settings]); |
| 17 | 17 | |
| 18 | - $moviecats = Category::getChildren(Category::MOVIE_ROOT)->map(function ($mcat) { |
|
| 18 | + $moviecats = Category::getChildren(Category::MOVIE_ROOT)->map(function($mcat) { |
|
| 19 | 19 | return ['id' => $mcat->id, 'title' => $mcat->title]; |
| 20 | 20 | }); |
| 21 | 21 | |
@@ -32,14 +32,14 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | $orderby = $request->input('ob', ''); |
| 34 | 34 | $ordering = $movie->getMovieOrdering(); |
| 35 | - if (! in_array($orderby, $ordering, false)) { |
|
| 35 | + if (!in_array($orderby, $ordering, false)) { |
|
| 36 | 36 | $orderby = ''; |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | $rslt = $movie->getMovieRange($page, $catarray, $offset, config('nntmux.items_per_cover_page'), $orderby, -1, $this->userdata->categoryexclusions); |
| 40 | 40 | $results = $this->paginate($rslt ?? [], $rslt[0]->_totalcount ?? 0, config('nntmux.items_per_cover_page'), $page, $request->url(), $request->query()); |
| 41 | 41 | |
| 42 | - $movies = $results->map(function ($result) { |
|
| 42 | + $movies = $results->map(function($result) { |
|
| 43 | 43 | $result['genre'] = makeFieldLinks($result, 'genre', 'movies'); |
| 44 | 44 | $result['actors'] = makeFieldLinks($result, 'actors', 'movies'); |
| 45 | 45 | $result['director'] = makeFieldLinks($result, 'director', 'movies'); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | // Get movie info |
| 100 | 100 | $movieInfo = $movie->getMovieInfo($imdbid); |
| 101 | 101 | |
| 102 | - if (! $movieInfo) { |
|
| 102 | + if (!$movieInfo) { |
|
| 103 | 103 | return redirect()->route('Movies')->with('error', 'Movie not found'); |
| 104 | 104 | } |
| 105 | 105 | |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | // Filter to only this movie's IMDB ID |
| 110 | 110 | $movieData = collect($rslt)->firstWhere('imdbid', $imdbid); |
| 111 | 111 | |
| 112 | - if (! $movieData) { |
|
| 112 | + if (!$movieData) { |
|
| 113 | 113 | return redirect()->route('Movies')->with('error', 'No releases found for this movie'); |
| 114 | 114 | } |
| 115 | 115 | |
@@ -134,13 +134,13 @@ discard block |
||
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | // Only process fields if they exist and are not empty |
| 137 | - if (! empty($movieArray['genre'])) { |
|
| 137 | + if (!empty($movieArray['genre'])) { |
|
| 138 | 138 | $movieArray['genre'] = makeFieldLinks($movieArray, 'genre', 'movies'); |
| 139 | 139 | } |
| 140 | - if (! empty($movieArray['actors'])) { |
|
| 140 | + if (!empty($movieArray['actors'])) { |
|
| 141 | 141 | $movieArray['actors'] = makeFieldLinks($movieArray, 'actors', 'movies'); |
| 142 | 142 | } |
| 143 | - if (! empty($movieArray['director'])) { |
|
| 143 | + if (!empty($movieArray['director'])) { |
|
| 144 | 144 | $movieArray['director'] = makeFieldLinks($movieArray, 'director', 'movies'); |
| 145 | 145 | } |
| 146 | 146 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | if ($request->has('id') && ctype_digit($request->input('id'))) { |
| 189 | 189 | $mov = $movie->getMovieInfo($request->input('id')); |
| 190 | 190 | |
| 191 | - if (! $mov) { |
|
| 191 | + if (!$mov) { |
|
| 192 | 192 | return response()->json(['message' => 'There is no trailer for this movie.'], 404); |
| 193 | 193 | } |
| 194 | 194 | |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | $cacheKey = 'trending_movies_top_15_48h'; |
| 231 | 231 | |
| 232 | 232 | // Get trending movies from cache or calculate (refresh every hour) |
| 233 | - $trendingMovies = \Illuminate\Support\Facades\Cache::remember($cacheKey, 3600, function () { |
|
| 233 | + $trendingMovies = \Illuminate\Support\Facades\Cache::remember($cacheKey, 3600, function() { |
|
| 234 | 234 | // Calculate timestamp for 48 hours ago |
| 235 | 235 | $fortyEightHoursAgo = \Illuminate\Support\Carbon::now()->subHours(48); |
| 236 | 236 | |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | ->get(); |
| 263 | 263 | |
| 264 | 264 | // Process the results |
| 265 | - return $query->map(function ($item) { |
|
| 265 | + return $query->map(function($item) { |
|
| 266 | 266 | // Add cover image URL using helper function |
| 267 | 267 | $coverArray = [ |
| 268 | 268 | 'imdbid' => $item->imdbid, |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $user = $request->user(); |
| 88 | 88 | |
| 89 | 89 | // Only allow canceling if 2FA is not yet enabled |
| 90 | - if ($user->passwordSecurity()->exists() && ! $user->passwordSecurity->google2fa_enable) { |
|
| 90 | + if ($user->passwordSecurity()->exists() && !$user->passwordSecurity->google2fa_enable) { |
|
| 91 | 91 | $user->passwordSecurity()->delete(); |
| 92 | 92 | |
| 93 | 93 | return redirect()->to('profileedit#security')->with('success_2fa', '2FA setup has been cancelled.'); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | public function disable2fa(Disable2faPasswordSecurityRequest $request): \Illuminate\Routing\Redirector|RedirectResponse|\Illuminate\Contracts\Foundation\Application |
| 100 | 100 | { |
| 101 | - if (! (Hash::check($request->get('current-password'), $request->user()->password))) { |
|
| 101 | + if (!(Hash::check($request->get('current-password'), $request->user()->password))) { |
|
| 102 | 102 | // Password doesn't match - always redirect to profile page with error |
| 103 | 103 | return redirect()->to('profileedit#security')->with('error_2fa', 'Your password does not match with your account password. Please try again.'); |
| 104 | 104 | } |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | ]); |
| 127 | 127 | |
| 128 | 128 | // Get the user ID from session |
| 129 | - if (! $request->session()->has('2fa:user:id')) { |
|
| 129 | + if (!$request->session()->has('2fa:user:id')) { |
|
| 130 | 130 | return redirect()->route('login') |
| 131 | 131 | ->with('message', 'The two-factor authentication session has expired. Please login again.') |
| 132 | 132 | ->with('message_type', 'danger'); |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | $userId = $request->session()->get('2fa:user:id'); |
| 136 | 136 | $user = \App\Models\User::find($userId); |
| 137 | 137 | |
| 138 | - if (! $user || ! $user->passwordSecurity) { |
|
| 138 | + if (!$user || !$user->passwordSecurity) { |
|
| 139 | 139 | $request->session()->forget('2fa:user:id'); |
| 140 | 140 | |
| 141 | 141 | return redirect()->route('login') |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $request->input('one_time_password') |
| 150 | 150 | ); |
| 151 | 151 | |
| 152 | - if (! $valid) { |
|
| 152 | + if (!$valid) { |
|
| 153 | 153 | return redirect()->route('2fa.verify') |
| 154 | 154 | ->with('message', 'Invalid authentication code. Please try again.') |
| 155 | 155 | ->with('message_type', 'danger'); |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | public function getVerify2fa(Request $request) |
| 227 | 227 | { |
| 228 | 228 | // Check if user ID is stored in the session |
| 229 | - if (! $request->session()->has('2fa:user:id')) { |
|
| 229 | + if (!$request->session()->has('2fa:user:id')) { |
|
| 230 | 230 | return redirect()->route('login') |
| 231 | 231 | ->withErrors(['msg' => 'The two-factor authentication session has expired. Please login again.']); |
| 232 | 232 | } |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | |
| 237 | 237 | // Get the user |
| 238 | 238 | $user = \App\Models\User::find($userId); |
| 239 | - if (! $user) { |
|
| 239 | + if (!$user) { |
|
| 240 | 240 | $request->session()->forget('2fa:user:id'); |
| 241 | 241 | |
| 242 | 242 | return redirect()->route('login') |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | 'current-password' => 'required', |
| 257 | 257 | ]); |
| 258 | 258 | |
| 259 | - if (! (Hash::check($request->get('current-password'), $request->user()->password))) { |
|
| 259 | + if (!(Hash::check($request->get('current-password'), $request->user()->password))) { |
|
| 260 | 260 | return redirect()->to('profileedit#security')->with('error_2fa', 'Your password does not match with your account password. Please try again.'); |
| 261 | 261 | } |
| 262 | 262 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | |
| 25 | 25 | // If guid is passed as URL parameter, merge it into request as 'id' |
| 26 | - if ($guid !== null && ! $request->has('id')) { |
|
| 26 | + if ($guid !== null && !$request->has('id')) { |
|
| 27 | 27 | $request->merge(['id' => $guid]); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | $res = User::getByRssToken($request->input('r')); |
| 45 | - if (! $res) { |
|
| 45 | + if (!$res) { |
|
| 46 | 46 | return Utility::showApiError(100); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | return Utility::showApiError(501); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - if (! $request->input('id')) { |
|
| 64 | + if (!$request->input('id')) { |
|
| 65 | 65 | return Utility::showApiError(200, 'Parameter id is required'); |
| 66 | 66 | } |
| 67 | 67 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | $nzbPath = (new NZB)->getNZBPath($request->input('id')); |
| 99 | 99 | |
| 100 | - if (! File::exists($nzbPath)) { |
|
| 100 | + if (!File::exists($nzbPath)) { |
|
| 101 | 101 | return Utility::showApiError(300, 'NZB file not found!'); |
| 102 | 102 | } |
| 103 | 103 | |
@@ -124,9 +124,9 @@ discard block |
||
| 124 | 124 | 'X-DNZB-Details' => url('/details/'.$request->input('id')), |
| 125 | 125 | ]; |
| 126 | 126 | |
| 127 | - if (! empty($relData['imdbid']) && $relData['imdbid'] > 0) { |
|
| 127 | + if (!empty($relData['imdbid']) && $relData['imdbid'] > 0) { |
|
| 128 | 128 | $headers['X-DNZB-MoreInfo'] = 'http://www.imdb.com/title/tt'.$relData['imdbid']; |
| 129 | - } elseif (! empty($relData['tvdb']) && $relData['tvdb'] > 0) { |
|
| 129 | + } elseif (!empty($relData['tvdb']) && $relData['tvdb'] > 0) { |
|
| 130 | 130 | $headers['X-DNZB-MoreInfo'] = 'http://www.thetvdb.com/?tab=series&id='.$relData['tvdb']; |
| 131 | 131 | } |
| 132 | 132 | |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | |
| 156 | 156 | $final = ''; |
| 157 | 157 | // Keep repeating until the end of the input file |
| 158 | - while (! gzeof($zd)) { |
|
| 158 | + while (!gzeof($zd)) { |
|
| 159 | 159 | // Read buffer-size bytes |
| 160 | 160 | $contents = gzread($zd, $buffer_size); |
| 161 | 161 | $tmp = preg_replace('/file poster=\"/i', 'file poster="'.$uid.'-', $contents, 10); |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | // Sanitize file name |
| 170 | 170 | $cleanName = str_replace([',', ' ', '/', '\\'], '_', $relData['searchname']); |
| 171 | 171 | |
| 172 | - return response()->streamDownload(function () use ($final) { |
|
| 172 | + return response()->streamDownload(function() use ($final) { |
|
| 173 | 173 | echo $final; |
| 174 | 174 | }, $cleanName.'.nzb', $headers); |
| 175 | 175 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - if (! preg_match("/\n/i", $request->input('useremail'))) { |
|
| 33 | + if (!preg_match("/\n/i", $request->input('useremail'))) { |
|
| 34 | 34 | SendContactUsEmail::dispatch($email, $mailTo, $mailBody)->onQueue('contactemail'); |
| 35 | 35 | } |
| 36 | 36 | $msg = "<h2 style='text-align:center;'>Thank you for getting in touch with ".config('app.name').'.</h2>'; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $releases = new Releases; |
| 124 | 124 | |
| 125 | 125 | // Set Query Parameters based on Request objects |
| 126 | - $outputXML = ! ($request->has('o') && $request->input('o') === 'json'); |
|
| 126 | + $outputXML = !($request->has('o') && $request->input('o') === 'json'); |
|
| 127 | 127 | $minSize = $request->has('minsize') && $request->input('minsize') > 0 ? $request->input('minsize') : 0; |
| 128 | 128 | $offset = $this->offset($request); |
| 129 | 129 | |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | |
| 265 | 265 | $this->addCoverURL( |
| 266 | 266 | $relData, |
| 267 | - function ($release) { |
|
| 267 | + function($release) { |
|
| 268 | 268 | return Utility::getCoverURL(['type' => 'movies', 'id' => $release->imdbid]); |
| 269 | 269 | } |
| 270 | 270 | ); |
@@ -306,9 +306,9 @@ discard block |
||
| 306 | 306 | |
| 307 | 307 | if ($rel && $rel->isNotEmpty()) { |
| 308 | 308 | $data = ReleaseNfo::getReleaseNfo($rel->id); |
| 309 | - if (! empty($data)) { |
|
| 309 | + if (!empty($data)) { |
|
| 310 | 310 | if ($request->has('o') && $request->input('o') === 'file') { |
| 311 | - return response()->streamDownload(function () use ($data) { |
|
| 311 | + return response()->streamDownload(function() use ($data) { |
|
| 312 | 312 | echo $data['nfo']; |
| 313 | 313 | }, $rel['searchname'].'.nfo', ['Content-type:' => 'application/octet-stream']); |
| 314 | 314 | } |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | // curl -X POST -F "file=@./The.File.nzb" "https://www.tabula-rasa.pw/api/V1/api?t=nzbadd&apikey=xxx" |
| 327 | 327 | // |
| 328 | 328 | case 'nzbAdd': |
| 329 | - if (! User::canPost($uid)) { |
|
| 329 | + if (!User::canPost($uid)) { |
|
| 330 | 330 | return response('User does not have permission to post', 403); |
| 331 | 331 | } |
| 332 | 332 | |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | return response('Missing parameter (apikey is required for adding an NZB)', 400); |
| 338 | 338 | } |
| 339 | 339 | |
| 340 | - if (! $request->hasFile('file')) { |
|
| 340 | + if (!$request->hasFile('file')) { |
|
| 341 | 341 | return response('Missing parameter (file is required for adding an NZB)', 400); |
| 342 | 342 | } |
| 343 | 343 | |
@@ -352,10 +352,10 @@ discard block |
||
| 352 | 352 | return response('File is not an NZB file', 400); |
| 353 | 353 | } |
| 354 | 354 | // Check if the file is proper xml nzb file. |
| 355 | - if (! Utility::isValidNewznabNzb($nzbFile->getContent())) { |
|
| 355 | + if (!Utility::isValidNewznabNzb($nzbFile->getContent())) { |
|
| 356 | 356 | return response('File is not a valid Newznab NZB file', 400); |
| 357 | 357 | } |
| 358 | - if (! File::isDirectory(config('nntmux.nzb_upload_folder'))) { |
|
| 358 | + if (!File::isDirectory(config('nntmux.nzb_upload_folder'))) { |
|
| 359 | 359 | @File::makeDirectory(config('nntmux.nzb_upload_folder'), 0775, true); |
| 360 | 360 | } |
| 361 | 361 | |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | header('Content-type: text/xml'); |
| 403 | 403 | } else { |
| 404 | 404 | // JSON encode the XMLWriter response |
| 405 | - $response = json_encode(xml_to_array($response), JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES); |
|
| 405 | + $response = json_encode(xml_to_array($response), JSON_THROW_ON_ERROR|JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES); |
|
| 406 | 406 | header('Content-type: application/json'); |
| 407 | 407 | } |
| 408 | 408 | if ($response === false) { |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | 'search' => ['available' => 'yes', 'supportedParams' => 'q'], |
| 446 | 446 | 'tv-search' => ['available' => 'yes', 'supportedParams' => 'q,vid,tvdbid,traktid,rid,tvmazeid,imdbid,tmdbid,season,ep'], |
| 447 | 447 | 'movie-search' => ['available' => 'yes', 'supportedParams' => 'q,imdbid, tmdbid, traktid'], |
| 448 | - 'audio-search' => ['available' => 'no', 'supportedParams' => ''], |
|
| 448 | + 'audio-search' => ['available' => 'no', 'supportedParams' => ''], |
|
| 449 | 449 | ], |
| 450 | 450 | 'categories' => $this->type === 'caps' |
| 451 | 451 | ? Category::getForMenu() |
@@ -460,9 +460,9 @@ discard block |
||
| 460 | 460 | { |
| 461 | 461 | $maxAge = -1; |
| 462 | 462 | if ($request->has('maxage')) { |
| 463 | - if (! $request->filled('maxage')) { |
|
| 463 | + if (!$request->filled('maxage')) { |
|
| 464 | 464 | return Utility::showApiError(201, 'Incorrect parameter (maxage must not be empty)'); |
| 465 | - } elseif (! is_numeric($request->input('maxage'))) { |
|
| 465 | + } elseif (!is_numeric($request->input('maxage'))) { |
|
| 466 | 466 | return Utility::showApiError(201, 'Incorrect parameter (maxage must be numeric)'); |
| 467 | 467 | } else { |
| 468 | 468 | $maxAge = (int) $request->input('maxage'); |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | if ($request->has('cat')) { |
| 482 | 482 | $categoryIDs = urldecode($request->input('cat')); |
| 483 | 483 | // Append Web-DL category ID if HD present for SickBeard / Sonarr compatibility. |
| 484 | - if (str_contains($categoryIDs, (string) Category::TV_HD) && ! str_contains($categoryIDs, (string) Category::TV_WEBDL) && (int) Settings::settingValue('catwebdl') === 0) { |
|
| 484 | + if (str_contains($categoryIDs, (string) Category::TV_HD) && !str_contains($categoryIDs, (string) Category::TV_WEBDL) && (int) Settings::settingValue('catwebdl') === 0) { |
|
| 485 | 485 | $categoryIDs .= (','.Category::TV_WEBDL); |
| 486 | 486 | } |
| 487 | 487 | $categoryID = explode(',', $categoryIDs); |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | public static function updateRelease($id, $name, $searchName, $fromName, $categoryId, $parts, $grabs, $size, $postedDate, $addedDate, $videoId, $episodeId, $imDbId, $aniDbId): void |
| 151 | 151 | { |
| 152 | 152 | $movieInfoId = null; |
| 153 | - if (! empty($imDbId)) { |
|
| 153 | + if (!empty($imDbId)) { |
|
| 154 | 154 | $movieInfoId = MovieInfo::whereImdbid($imDbId)->first(['id']); |
| 155 | 155 | } |
| 156 | 156 | self::whereId($id)->update( |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | |
| 342 | 342 | $releases = $query->get(); |
| 343 | 343 | |
| 344 | - $releases->each(function ($release) { |
|
| 344 | + $releases->each(function($release) { |
|
| 345 | 345 | $release->group_name = $release->group->name ?? null; |
| 346 | 346 | $release->showtitle = $release->video->title ?? null; |
| 347 | 347 | $release->tvdb = $release->video->tvdb ?? null; |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | $release->sub_category = $release->category->title ?? null; |
| 359 | 359 | $release->category_name = $release->parent_category.' > '.$release->sub_category; |
| 360 | 360 | $release->category_ids = $release->category ? ($release->category->parentid.','.$release->category->id) : ''; |
| 361 | - $release->group_names = $release->releaseGroup->map(function ($relGroup) { |
|
| 361 | + $release->group_names = $release->releaseGroup->map(function($relGroup) { |
|
| 362 | 362 | return $relGroup->group ? $relGroup->group->name : null; |
| 363 | 363 | })->implode(','); |
| 364 | 364 | }); |
@@ -395,12 +395,12 @@ discard block |
||
| 395 | 395 | |
| 396 | 396 | preg_match('/(^\w+[-_. ].+?\.(\d+p)).+/i', $rel['searchname'], $similar); |
| 397 | 397 | |
| 398 | - if (! empty($similar)) { |
|
| 398 | + if (!empty($similar)) { |
|
| 399 | 399 | if (config('nntmux.elasticsearch_enabled') === true) { |
| 400 | 400 | $searchResult = (new ElasticSearchSiteSearch)->indexSearch($similar[1], 10); |
| 401 | 401 | } else { |
| 402 | 402 | $searchResult = (new ManticoreSearch)->searchIndexes('releases_rt', $similar[1]); |
| 403 | - if (! empty($searchResult)) { |
|
| 403 | + if (!empty($searchResult)) { |
|
| 404 | 404 | $searchResult = Arr::wrap(Arr::get($searchResult, 'id')); |
| 405 | 405 | } |
| 406 | 406 | } |