@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | 'airdate', |
94 | 94 | 'episode_title', |
95 | 95 | ])->first(); |
96 | - if (! empty($result)) { |
|
96 | + if (!empty($result)) { |
|
97 | 97 | return $result->toArray(); |
98 | 98 | } |
99 | 99 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $this->status = self::PROC_EXTFAIL; |
144 | 144 | } |
145 | 145 | |
146 | - if (! empty($hits['title'])) { |
|
146 | + if (!empty($hits['title'])) { |
|
147 | 147 | $hits['title'] = trim(str_replace(['_', '.'], ' ', $hits['title'])); |
148 | 148 | } |
149 | 149 | |
@@ -187,10 +187,10 @@ discard block |
||
187 | 187 | $anidbId = $this->getAnidbByName($tmpName); |
188 | 188 | } |
189 | 189 | |
190 | - if (! empty($anidbId) && is_numeric($anidbId->anidbid) && $anidbId->anidbid > 0) { |
|
190 | + if (!empty($anidbId) && is_numeric($anidbId->anidbid) && $anidbId->anidbid > 0) { |
|
191 | 191 | $updatedAni = $this->checkAniDBInfo($anidbId->anidbid, $cleanArr['epno']); |
192 | 192 | if (empty($updatedAni)) { |
193 | - if (! empty($this->updateTimeCheck($anidbId->anidbid))) { |
|
193 | + if (!empty($this->updateTimeCheck($anidbId->anidbid))) { |
|
194 | 194 | $this->padb->populateTable('info', $anidbId->anidbid); |
195 | 195 | $this->doRandomSleep(); |
196 | 196 | $updatedAni = $this->checkAniDBInfo($anidbId->anidbid); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | */ |
154 | 154 | public function updatePreDb(array $parameters): void |
155 | 155 | { |
156 | - if (! empty($parameters)) { |
|
156 | + if (!empty($parameters)) { |
|
157 | 157 | $this->insertPredb($parameters); |
158 | 158 | } |
159 | 159 | } |
@@ -214,15 +214,15 @@ discard block |
||
214 | 214 | $resultData = []; |
215 | 215 | try { |
216 | 216 | $query = $this->search->setIndex($rt_index)->option('ranker', 'sph04')->option('sort_method', 'pq')->maxMatches(10000)->limit(10000)->sort('id', 'desc')->stripBadUtf8(true)->trackScores(true); |
217 | - if (! empty($searchArray)) { |
|
217 | + if (!empty($searchArray)) { |
|
218 | 218 | foreach ($searchArray as $key => $value) { |
219 | 219 | $query->search('@@relaxed @'.$key.' '.self::escapeString($value)); |
220 | 220 | } |
221 | - } elseif (! empty($searchString)) { |
|
221 | + } elseif (!empty($searchString)) { |
|
222 | 222 | // If $column is an array and has more than one item, implode it and wrap in parentheses. |
223 | - if (! empty($column) && \count($column) > 1) { |
|
223 | + if (!empty($column) && \count($column) > 1) { |
|
224 | 224 | $searchColumns = '@('.implode(',', $column).')'; |
225 | - } elseif (! empty($column) && \count($column) == 1) { // If $column is an array and has only one item, use as is. |
|
225 | + } elseif (!empty($column) && \count($column) == 1) { // If $column is an array and has only one item, use as is. |
|
226 | 226 | $searchColumns = '@'.$column[0]; |
227 | 227 | } else { |
228 | 228 | $searchColumns = ''; // Careful, this will search all columns. |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | public function beginImport($filesToProcess, bool $useNzbName = false, bool $delete = false, bool $deleteFailed = false): bool|string |
81 | 81 | { |
82 | 82 | // Get all the groups in the DB. |
83 | - if (! $this->getAllGroups()) { |
|
83 | + if (!$this->getAllGroups()) { |
|
84 | 84 | if ($this->browser) { |
85 | 85 | return $this->retVal; |
86 | 86 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | gzwrite($fp, $nzbString); |
146 | 146 | gzclose($fp); |
147 | 147 | |
148 | - if (! File::isFile($path)) { |
|
148 | + if (!File::isFile($path)) { |
|
149 | 149 | $this->echoOut('ERROR: Problem compressing NZB file to: '.$path); |
150 | 150 | |
151 | 151 | // Remove the release. |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | if ($groupID === -1) { |
232 | 232 | if (array_key_exists($group, $this->allGroups)) { |
233 | 233 | $groupID = $this->allGroups[$group]; |
234 | - if (! $groupName) { |
|
234 | + if (!$groupName) { |
|
235 | 235 | $groupName = $group; |
236 | 236 | } |
237 | 237 | } else { |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | } |
266 | 266 | |
267 | 267 | // If we found a group and it's not blacklisted. |
268 | - if ($groupID !== -1 && ! $isBlackListed) { |
|
268 | + if ($groupID !== -1 && !$isBlackListed) { |
|
269 | 269 | // Get the size of the release. |
270 | 270 | if (\count($file->segments->segment) > 0) { |
271 | 271 | foreach ($file->segments->segment as $segment) { |
@@ -17,7 +17,7 @@ |
||
17 | 17 | public function handle(Request $request, Closure $next): Response |
18 | 18 | { |
19 | 19 | // Force Json accept type on api routes |
20 | - if ($request->is('api/*') && ! Str::contains($request->header('accept'), ['/json', '+json'])) { |
|
20 | + if ($request->is('api/*') && !Str::contains($request->header('accept'), ['/json', '+json'])) { |
|
21 | 21 | $request->headers->set('accept', 'application/json,'.$request->header('accept')); |
22 | 22 | } |
23 | 23 |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | protected function trailers(): mixed |
60 | 60 | { |
61 | 61 | $ret = $this->_html->find('a[itemprop=trailer]', 0); |
62 | - if (! empty($ret) && preg_match('/movieId=(?<movieid>\d+)&/', trim($ret->href), $hits)) { |
|
62 | + if (!empty($ret) && preg_match('/movieId=(?<movieid>\d+)&/', trim($ret->href), $hits)) { |
|
63 | 63 | $movieid = $hits['movieid']; |
64 | 64 | $this->_res['trailers']['url'] = self::AEBNSURL.self::TRAILERURL.$movieid; |
65 | 65 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $this->_res['genres'][] = trim($genre->plaintext); |
96 | 96 | } |
97 | 97 | } |
98 | - if (! empty($this->_res['genres'])) { |
|
98 | + if (!empty($this->_res['genres'])) { |
|
99 | 99 | $this->_res['genres'] = array_unique($this->_res['genres']); |
100 | 100 | } |
101 | 101 | |
@@ -109,13 +109,13 @@ discard block |
||
109 | 109 | { |
110 | 110 | $this->_res = []; |
111 | 111 | $ret = $this->_html->findOne('div.starsFull'); |
112 | - if (! $ret instanceof SimpleHtmlDomNodeBlank) { |
|
112 | + if (!$ret instanceof SimpleHtmlDomNodeBlank) { |
|
113 | 113 | foreach ($ret->find('span[itemprop=name]') as $star) { |
114 | 114 | $this->_res['cast'][] = trim($star->plaintext); |
115 | 115 | } |
116 | 116 | } else { |
117 | 117 | $ret = $this->_html->findOne('div.detailsLink'); |
118 | - if (! $ret instanceof SimpleHtmlDomNodeBlank) { |
|
118 | + if (!$ret instanceof SimpleHtmlDomNodeBlank) { |
|
119 | 119 | foreach ($ret->find('span') as $star) { |
120 | 120 | if (str_contains($star->plaintext, '/More/') && str_contains($star->plaintext, '/Stars/')) { |
121 | 121 | $this->_res['cast'][] = trim($star->plaintext); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | $videoDuration = $videoFormat = $videoCodec = $videoWidth = $videoHeight = $videoAspect = $videoFrameRate = $videoLibrary = $videoBitRate = ''; |
91 | 91 | |
92 | - if (! empty($videos)) { |
|
92 | + if (!empty($videos)) { |
|
93 | 93 | foreach ($videos as $video) { |
94 | 94 | if ($video->get('duration') !== null) { |
95 | 95 | $videoDuration = $video->get('duration')->getMilliseconds(); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $videoBitRate = $video->get('nominal_bit_rate')->getTextValue(); |
140 | 140 | } |
141 | 141 | |
142 | - if (! empty($videoBitRate)) { |
|
142 | + if (!empty($videoBitRate)) { |
|
143 | 143 | $overallBitRate = $videoBitRate; |
144 | 144 | } |
145 | 145 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $audioID = 1; |
151 | 151 | $audioFormat = $audioMode = $audioBitRateMode = $audioBitRate = $audioChannels = $audioSampleRate = $audioLibrary = $audioLanguage = $audioTitle = ''; |
152 | 152 | |
153 | - if (! empty($audios)) { |
|
153 | + if (!empty($audios)) { |
|
154 | 154 | foreach ($audios as $audio) { |
155 | 155 | if ($audio->get('id') !== null) { |
156 | 156 | $audioID = $audio->get('id')->getFullName(); |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | } |
197 | 197 | } |
198 | 198 | |
199 | - if (! empty($subtitles)) { |
|
199 | + if (!empty($subtitles)) { |
|
200 | 200 | foreach ($subtitles as $subtitle) { |
201 | 201 | $subsID = 1; |
202 | 202 | $subsLanguage = 'Unknown'; |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | 'audiochannels' => \is_array($audioChannels) ? implode($audioChannels) : $audioChannels, |
261 | 261 | 'audiosamplerate' => \is_array($audioSampleRate) ? implode($audioSampleRate) : $audioSampleRate, |
262 | 262 | 'audiolibrary' => \is_array($audioLibrary) ? implode($audioLibrary) : $audioLibrary, |
263 | - 'audiolanguage' => ! empty($audioLanguage) ? $audioLanguage[1] : '', |
|
263 | + 'audiolanguage' => !empty($audioLanguage) ? $audioLanguage[1] : '', |
|
264 | 264 | 'audiotitle' => \is_array($audioTitle) ? implode($audioTitle) : $audioTitle, |
265 | 265 | ]); |
266 | 266 | } |
@@ -270,10 +270,10 @@ discard block |
||
270 | 270 | { |
271 | 271 | $ckid = ReleaseSubtitle::query()->where('releases_id', $releaseID)->where('subsid', '=', $subsID)->first(['releases_id']); |
272 | 272 | $subs = ''; |
273 | - if (! empty($subsLanguage)) { |
|
274 | - if (! empty($subsLanguage[1])) { |
|
273 | + if (!empty($subsLanguage)) { |
|
274 | + if (!empty($subsLanguage[1])) { |
|
275 | 275 | $subs = $subsLanguage[1]; |
276 | - } elseif (! empty($subsLanguage[0])) { |
|
276 | + } elseif (!empty($subsLanguage[0])) { |
|
277 | 277 | $subs = $subsLanguage[0]; |
278 | 278 | } |
279 | 279 | } |
@@ -810,7 +810,7 @@ discard block |
||
810 | 810 | $release = (object) $release; |
811 | 811 | } |
812 | 812 | // If $release does not have a releases_id, we should add it. |
813 | - if (! isset($release->releases_id)) { |
|
813 | + if (!isset($release->releases_id)) { |
|
814 | 814 | $release->releases_id = $release->id; |
815 | 815 | } |
816 | 816 | if ($this->relid !== $release->releases_id) { |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | $this->matched = true; |
820 | 820 | $this->relid = (int) $release->releases_id; |
821 | 821 | |
822 | - $determinedCategory = $this->category->determineCategory($release->groups_id, $newName, ! empty($release->fromname) ? $release->fromname : ''); |
|
822 | + $determinedCategory = $this->category->determineCategory($release->groups_id, $newName, !empty($release->fromname) ? $release->fromname : ''); |
|
823 | 823 | |
824 | 824 | if ($type === 'PAR2, ') { |
825 | 825 | $newName = ucwords($newName); |
@@ -860,7 +860,7 @@ discard block |
||
860 | 860 | $this->colorCLI->info($type.$method). |
861 | 861 | $this->colorCLI->headerOver('Releases ID: '). |
862 | 862 | $this->colorCLI->info($release->releases_id); |
863 | - if (! empty($release->filename)) { |
|
863 | + if (!empty($release->filename)) { |
|
864 | 864 | $this->colorCLI->headerOver('Filename: '). |
865 | 865 | $this->colorCLI->info($release->filename); |
866 | 866 | } |
@@ -1058,7 +1058,7 @@ discard block |
||
1058 | 1058 | |
1059 | 1059 | if (\strlen($preTitle) >= 15 && preg_match(self::PREDB_REGEX, $preTitle)) { |
1060 | 1060 | $titleMatch = $this->manticore->searchIndexes('releases_rt', $preTitle, ['name', 'searchname', 'filename']); |
1061 | - if (! empty($titleMatch)) { |
|
1061 | + if (!empty($titleMatch)) { |
|
1062 | 1062 | $join = implode(',', Arr::get($titleMatch, 'id')); |
1063 | 1063 | } |
1064 | 1064 | } |
@@ -1155,9 +1155,9 @@ discard block |
||
1155 | 1155 | } else { |
1156 | 1156 | $results = Arr::get($this->manticore->searchIndexes('predb_rt', $preMatch[1], ['filename', 'title']), 'data'); |
1157 | 1157 | } |
1158 | - if (! empty($results)) { |
|
1158 | + if (!empty($results)) { |
|
1159 | 1159 | foreach ($results as $result) { |
1160 | - if (! empty($result)) { |
|
1160 | + if (!empty($result)) { |
|
1161 | 1161 | $preFtMatch = $this->preMatch($result['filename']); |
1162 | 1162 | if ($preFtMatch[0] === true) { |
1163 | 1163 | $this->_fileName = $result['filename']; |
@@ -1187,7 +1187,7 @@ discard block |
||
1187 | 1187 | // first strip all non-printing chars from filename |
1188 | 1188 | $this->_fileName = str_replace('/[[:^print:]]/', '', $this->_fileName); |
1189 | 1189 | |
1190 | - if ($this->_fileName !== '' && ! str_starts_with($this->_fileName, '.')) { |
|
1190 | + if ($this->_fileName !== '' && !str_starts_with($this->_fileName, '.')) { |
|
1191 | 1191 | $this->_fileName = match (true) { |
1192 | 1192 | str_contains($this->_fileName, '.') => Str::beforeLast('.', $this->_fileName), |
1193 | 1193 | preg_match('/\.part\d+$/', $this->_fileName) => Str::beforeLast('.', $this->_fileName), |
@@ -1233,7 +1233,7 @@ discard block |
||
1233 | 1233 | ); |
1234 | 1234 | |
1235 | 1235 | foreach ($row as $item) { |
1236 | - if (! empty($item)) { |
|
1236 | + if (!empty($item)) { |
|
1237 | 1237 | if ($item->title !== $release->searchname) { |
1238 | 1238 | $this->updateRelease($release, $item->title, 'predb hash release name: '.$item->source, $echo, $hashtype, $nameStatus, $show, $item->predb_id); |
1239 | 1239 | $matching++; |
@@ -1318,7 +1318,7 @@ discard block |
||
1318 | 1318 | { |
1319 | 1319 | |
1320 | 1320 | // Get pre style name from releases.name |
1321 | - if (preg_match_all(self::PREDB_REGEX, $release->textstring, $hits) && ! preg_match('/Source\s\:/i', $release->textstring)) { |
|
1321 | + if (preg_match_all(self::PREDB_REGEX, $release->textstring, $hits) && !preg_match('/Source\s\:/i', $release->textstring)) { |
|
1322 | 1322 | foreach ($hits as $hit) { |
1323 | 1323 | foreach ($hit as $val) { |
1324 | 1324 | $title = Predb::query()->where('title', trim($val))->select(['title', 'id'])->first(); |
@@ -1331,7 +1331,7 @@ discard block |
||
1331 | 1331 | } |
1332 | 1332 | |
1333 | 1333 | // if only processing for PreDB match skip to return |
1334 | - if (! $preId) { |
|
1334 | + if (!$preId) { |
|
1335 | 1335 | switch ($type) { |
1336 | 1336 | case 'PAR2, ': |
1337 | 1337 | $this->fileCheck($release, $echo, $type, $nameStatus, $show); |
@@ -1371,7 +1371,7 @@ discard block |
||
1371 | 1371 | } |
1372 | 1372 | |
1373 | 1373 | // set NameFixer process flags after run |
1374 | - if ($nameStatus === true && ! $this->matched) { |
|
1374 | + if ($nameStatus === true && !$this->matched) { |
|
1375 | 1375 | switch ($type) { |
1376 | 1376 | case 'NFO, ': |
1377 | 1377 | $this->_updateSingleColumn('proc_nfo', self::PROC_NFO_DONE, $release->releases_id); |
@@ -1421,7 +1421,7 @@ discard block |
||
1421 | 1421 | |
1422 | 1422 | $result = []; |
1423 | 1423 | |
1424 | - if (! $this->done && $this->relid !== (int) $release->releases_id) { |
|
1424 | + if (!$this->done && $this->relid !== (int) $release->releases_id) { |
|
1425 | 1425 | if (preg_match('/\w[\-\w.\',;& ]+((s\d{1,2}[._ -]?[bde]\d{1,2})|(?<!\d)[S|]\d{1,2}[E|x]\d{1,}(?!\d)|ep[._ -]?\d{2})[\-\w.\',;.()]+(BD(-?(25|50|RIP))?|Blu-?Ray ?(3D)?|BRRIP|CAM(RIP)?|DBrip|DTV|DVD\-?(5|9|(R(IP)?|scr(eener)?))?|[HPS]D?(RIP|TV(RIP)?)?|NTSC|PAL|R5|Ripped |S?VCD|scr(eener)?|SAT(RIP)?|TS|VHS(RIP)?|VOD|WEB-DL)[._ -][\-\w.\',;& ]+\w/i', $release->textstring, $result)) { |
1426 | 1426 | $this->updateRelease($release, $result['0'], 'tvCheck: Title.SxxExx.Text.source.group', $echo, $type, $nameStatus, $show); |
1427 | 1427 | } elseif (preg_match('/\w[\-\w.\',;& ]+((s\d{1,2}[._ -]?[bde]\d{1,2})|\d{1,2}x\d{2}|ep[._ -]?\d{2})[\-\w.\',;& ]+((19|20)\d\d)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) { |
@@ -1451,7 +1451,7 @@ discard block |
||
1451 | 1451 | |
1452 | 1452 | $result = []; |
1453 | 1453 | |
1454 | - if (! $this->done && $this->relid !== (int) $release->releases_id) { |
|
1454 | + if (!$this->done && $this->relid !== (int) $release->releases_id) { |
|
1455 | 1455 | if (preg_match('/\w[\-\w.\',;& ]+((19|20)\d\d)[\-\w.\',;& ]+(480|720|1080)[ip][._ -](DivX|[HX][._ -]?264|MPEG2|XviD(HD)?|WMV)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) { |
1456 | 1456 | $this->updateRelease($release, $result['0'], 'movieCheck: Title.year.Text.res.vcod.group', $echo, $type, $nameStatus, $show); |
1457 | 1457 | } elseif (preg_match('/\w[\-\w.\',;& ]+((19|20)\d\d)[._ -](BD(-?(25|50|RIP))?|Blu-?Ray ?(3D)?|BRRIP|CAM(RIP)?|DBrip|DTV|DVD\-?(5|9|(R(IP)?|scr(eener)?))?|[HPS]D?(RIP|TV(RIP)?)?|NTSC|PAL|R5|Ripped |S?VCD|scr(eener)?|SAT(RIP)?|TS|VHS(RIP)?|VOD|WEB-DL)[._ -](DivX|[HX][._ -]?264|MPEG2|XviD(HD)?|WMV)[._ -](480|720|1080)[ip][\-\w.\',;& ]+\w/i', $release->textstring, $result)) { |
@@ -1493,7 +1493,7 @@ discard block |
||
1493 | 1493 | |
1494 | 1494 | $result = []; |
1495 | 1495 | |
1496 | - if (! $this->done && $this->relid !== (int) $release->releases_id) { |
|
1496 | + if (!$this->done && $this->relid !== (int) $release->releases_id) { |
|
1497 | 1497 | if (preg_match('/\w[\-\w.\',;& ]+(ASIA|DLC|EUR|GOTY|JPN|KOR|MULTI\d{1}|NTSCU?|PAL|RF|Region[._ -]?Free|USA|XBLA)[._ -](DLC[._ -]Complete|FRENCH|GERMAN|MULTI\d{1}|PROPER|PSN|READ[._ -]?NFO|UMD)?[._ -]?(GC|NDS|NGC|PS3|PSP|WII|XBOX(360)?)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) { |
1498 | 1498 | $this->updateRelease($release, $result['0'], 'gameCheck: Videogames 1', $echo, $type, $nameStatus, $show); |
1499 | 1499 | } elseif (preg_match('/\w[\-\w.\',;& ]+(GC|NDS|NGC|PS3|WII|XBOX(360)?)[._ -](DUPLEX|iNSOMNi|OneUp|STRANGE|SWAG|SKY)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) { |
@@ -1519,7 +1519,7 @@ discard block |
||
1519 | 1519 | |
1520 | 1520 | $result = []; |
1521 | 1521 | |
1522 | - if (! $this->done && $this->relid !== (int) $release->releases_id) { |
|
1522 | + if (!$this->done && $this->relid !== (int) $release->releases_id) { |
|
1523 | 1523 | if (preg_match('/\w[\-\w.\',;& ]+(\d{1,10}|Linux|UNIX)[._ -](RPM)?[._ -]?(X64)?[._ -]?(Incl)[._ -](Keygen)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) { |
1524 | 1524 | $this->updateRelease($release, $result['0'], 'appCheck: Apps 1', $echo, $type, $nameStatus, $show); |
1525 | 1525 | } elseif (preg_match('/\w[\-\w.\',;& ]+\d{1,8}[._ -](winall-freeware)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) { |
@@ -1539,7 +1539,7 @@ discard block |
||
1539 | 1539 | |
1540 | 1540 | $result = []; |
1541 | 1541 | |
1542 | - if (! $this->done && $this->relid !== (int) $release->releases_id) { |
|
1542 | + if (!$this->done && $this->relid !== (int) $release->releases_id) { |
|
1543 | 1543 | if (preg_match('/:\s*.*[\\\\\/]([A-Z0-9].+?S\d+[.-_ ]?[ED]\d+.+?)\.\w{2,}\s+/i', $release->textstring, $result)) { |
1544 | 1544 | $this->updateRelease($release, $result['1'], 'nfoCheck: Generic TV 1', $echo, $type, $nameStatus, $show); |
1545 | 1545 | } elseif (preg_match('/(?:(\:\s{1,}))(.+?S\d{1,3}[.-_ ]?[ED]\d{1,3}.+?)(\s{2,}|\r|\n)/i', $release->textstring, $result)) { |
@@ -1559,7 +1559,7 @@ discard block |
||
1559 | 1559 | |
1560 | 1560 | $result = []; |
1561 | 1561 | |
1562 | - if (! $this->done && $this->relid !== (int) $release->releases_id) { |
|
1562 | + if (!$this->done && $this->relid !== (int) $release->releases_id) { |
|
1563 | 1563 | if (preg_match('/(?:((?!Source\s)\:\s{1,}))(.+?(19|20)\d\d.+?(BDRip|bluray|DVD(R|Rip)?|XVID).+?)(\s{2,}|\r|\n)/i', $release->textstring, $result)) { |
1564 | 1564 | $this->updateRelease($release, $result['2'], 'nfoCheck: Generic Movies 1', $echo, $type, $nameStatus, $show); |
1565 | 1565 | } elseif (preg_match('/(?:(\s{2,}))((?!Source).+?[\.\-_ ](19|20)\d\d.+?(BDRip|bluray|DVD(R|Rip)?|XVID).+?)(\s{2,}|\r|\n)/i', $release->textstring, $result)) { |
@@ -1578,7 +1578,7 @@ discard block |
||
1578 | 1578 | |
1579 | 1579 | $result = []; |
1580 | 1580 | |
1581 | - if (! $this->done && $this->relid !== (int) $release->releases_id && preg_match('/(?:\s{2,})(.+?-FM-\d{2}-\d{2})/i', $release->textstring, $result)) { |
|
1581 | + if (!$this->done && $this->relid !== (int) $release->releases_id && preg_match('/(?:\s{2,})(.+?-FM-\d{2}-\d{2})/i', $release->textstring, $result)) { |
|
1582 | 1582 | $newName = str_replace('-FM-', '-FM-Radio-MP3-', $result['1']); |
1583 | 1583 | $this->updateRelease($release, $newName, 'nfoCheck: Music FM RADIO', $echo, $type, $nameStatus, $show); |
1584 | 1584 | } |
@@ -1595,7 +1595,7 @@ discard block |
||
1595 | 1595 | |
1596 | 1596 | $result = []; |
1597 | 1597 | |
1598 | - if (! $this->done && $this->relid !== (int) $release->releases_id && preg_match('/(\w[\-\w`~!@#$%^&*()_+={}|"<>?\[\]\\;\',.\/ ]+\s?\((19|20)\d\d\))/i', $release->textstring, $result) && ! preg_match('/\.pdf|Audio ?Book/i', $release->textstring)) { |
|
1598 | + if (!$this->done && $this->relid !== (int) $release->releases_id && preg_match('/(\w[\-\w`~!@#$%^&*()_+={}|"<>?\[\]\\;\',.\/ ]+\s?\((19|20)\d\d\))/i', $release->textstring, $result) && !preg_match('/\.pdf|Audio ?Book/i', $release->textstring)) { |
|
1599 | 1599 | $releaseName = $result[0]; |
1600 | 1600 | if (preg_match('/(idiomas|lang|language|langue|sprache).*?\b(?P<lang>Brazilian|Chinese|Croatian|Danish|DE|Deutsch|Dutch|Estonian|ES|English|Englisch|Finnish|Flemish|Francais|French|FR|German|Greek|Hebrew|Icelandic|Italian|Japenese|Japan|Japanese|Korean|Latin|Nordic|Norwegian|Polish|Portuguese|Russian|Serbian|Slovenian|Swedish|Spanisch|Spanish|Thai|Turkish)\b/i', $release->textstring, $result)) { |
1601 | 1601 | switch ($result['lang']) { |
@@ -1768,7 +1768,7 @@ discard block |
||
1768 | 1768 | |
1769 | 1769 | $result = []; |
1770 | 1770 | |
1771 | - if (! $this->done && $this->relid !== (int) $release->releases_id) { |
|
1771 | + if (!$this->done && $this->relid !== (int) $release->releases_id) { |
|
1772 | 1772 | if (preg_match('/ALiAS|BAT-TEAM|FAiRLiGHT|Game Type|Glamoury|HI2U|iTWINS|JAGUAR|(LARGE|MEDIUM)ISO|MAZE|nERv|PROPHET|PROFiT|PROCYON|RELOADED|REVOLVER|ROGUE|ViTALiTY/i', $release->textstring)) { |
1773 | 1773 | if (preg_match('/\w[\w.+&*\/\()\',;: -]+\(c\)[\-\w.\',;& ]+\w/i', $release->textstring, $result)) { |
1774 | 1774 | $releaseName = str_replace(['(c)', '(C)'], '(GAMES) (c)', $result['0']); |
@@ -1792,7 +1792,7 @@ discard block |
||
1792 | 1792 | public function nfoCheckMisc($release, bool $echo, string $type, $nameStatus, $show): void |
1793 | 1793 | { |
1794 | 1794 | |
1795 | - if (! $this->done && $this->relid !== (int) $release->releases_id) { |
|
1795 | + if (!$this->done && $this->relid !== (int) $release->releases_id) { |
|
1796 | 1796 | if (preg_match('/Supplier.+?IGUANA/i', $release->textstring)) { |
1797 | 1797 | $releaseName = ''; |
1798 | 1798 | $result = []; |
@@ -1831,7 +1831,7 @@ discard block |
||
1831 | 1831 | |
1832 | 1832 | $result = []; |
1833 | 1833 | |
1834 | - if (! $this->done && $this->relid !== (int) $release->releases_id) { |
|
1834 | + if (!$this->done && $this->relid !== (int) $release->releases_id) { |
|
1835 | 1835 | switch (true) { |
1836 | 1836 | case preg_match('/^(.+?(x264|XviD)\-TVP)\\\\/i', $release->textstring, $result): |
1837 | 1837 | $this->updateRelease($release, $result['1'], 'fileCheck: TVP', $echo, $type, $nameStatus, $show); |
@@ -1923,7 +1923,7 @@ discard block |
||
1923 | 1923 | public function uidCheck($release, $echo, $type, $nameStatus, $show): bool |
1924 | 1924 | { |
1925 | 1925 | |
1926 | - if (! empty($release->uid) && ! $this->done && $this->relid !== (int) $release->releases_id) { |
|
1926 | + if (!empty($release->uid) && !$this->done && $this->relid !== (int) $release->releases_id) { |
|
1927 | 1927 | $result = Release::fromQuery(sprintf( |
1928 | 1928 | ' |
1929 | 1929 | SELECT r.id AS releases_id, r.size AS relsize, r.name AS textstring, r.searchname, r.fromname, r.predb_id |
@@ -1972,8 +1972,8 @@ discard block |
||
1972 | 1972 | { |
1973 | 1973 | |
1974 | 1974 | $newName = ''; |
1975 | - if (! $this->done && $this->relid !== (int) $release->releases_id) { |
|
1976 | - if (! empty($release->movie_name)) { |
|
1975 | + if (!$this->done && $this->relid !== (int) $release->releases_id) { |
|
1976 | + if (!empty($release->movie_name)) { |
|
1977 | 1977 | if (preg_match(self::PREDB_REGEX, $release->movie_name, $hit)) { |
1978 | 1978 | $newName = $hit[1]; |
1979 | 1979 | } elseif (preg_match('/(.+),(\sRMZ\.cr)?$/i', $release->movie_name, $hit)) { |
@@ -2004,7 +2004,7 @@ discard block |
||
2004 | 2004 | public function xxxNameCheck($release, $echo, $type, $nameStatus, $show): bool |
2005 | 2005 | { |
2006 | 2006 | |
2007 | - if (! $this->done && $this->relid !== (int) $release->releases_id) { |
|
2007 | + if (!$this->done && $this->relid !== (int) $release->releases_id) { |
|
2008 | 2008 | $result = Release::fromQuery( |
2009 | 2009 | sprintf( |
2010 | 2010 | " |
@@ -2052,7 +2052,7 @@ discard block |
||
2052 | 2052 | public function srrNameCheck($release, $echo, $type, $nameStatus, $show): bool |
2053 | 2053 | { |
2054 | 2054 | |
2055 | - if (! $this->done && $this->relid !== (int) $release->releases_id) { |
|
2055 | + if (!$this->done && $this->relid !== (int) $release->releases_id) { |
|
2056 | 2056 | $result = Release::fromQuery( |
2057 | 2057 | sprintf( |
2058 | 2058 | " |
@@ -2100,7 +2100,7 @@ discard block |
||
2100 | 2100 | public function hashCheck($release, $echo, $type, $nameStatus, $show): bool |
2101 | 2101 | { |
2102 | 2102 | |
2103 | - if (! $this->done && $this->relid !== (int) $release->releases_id) { |
|
2103 | + if (!$this->done && $this->relid !== (int) $release->releases_id) { |
|
2104 | 2104 | $result = Release::fromQuery(sprintf( |
2105 | 2105 | ' |
2106 | 2106 | SELECT r.id AS releases_id, r.size AS relsize, r.name AS textstring, r.searchname, r.fromname, r.predb_id |
@@ -2146,7 +2146,7 @@ discard block |
||
2146 | 2146 | public function crcCheck($release, $echo, $type, $nameStatus, $show): bool |
2147 | 2147 | { |
2148 | 2148 | |
2149 | - if (! $this->done && $this->relid !== (int) $release->releases_id && $release->textstring !== '') { |
|
2149 | + if (!$this->done && $this->relid !== (int) $release->releases_id && $release->textstring !== '') { |
|
2150 | 2150 | $result = Release::fromQuery( |
2151 | 2151 | sprintf( |
2152 | 2152 | ' |
@@ -2207,11 +2207,11 @@ discard block |
||
2207 | 2207 | $this->_fileName = $release->textstring; |
2208 | 2208 | $this->_cleanMatchFiles(); |
2209 | 2209 | $this->cleanFileNames(); |
2210 | - if (! empty($this->_fileName)) { |
|
2210 | + if (!empty($this->_fileName)) { |
|
2211 | 2211 | if (config('nntmux.elasticsearch_enabled') === true) { |
2212 | 2212 | $results = $this->elasticsearch->searchPreDb($this->_fileName); |
2213 | 2213 | foreach ($results as $hit) { |
2214 | - if (! empty($hit)) { |
|
2214 | + if (!empty($hit)) { |
|
2215 | 2215 | $this->updateRelease($release, $hit['title'], 'PreDb: Filename match', $echo, $type, $nameStatus, $show, $hit['id']); |
2216 | 2216 | |
2217 | 2217 | return true; |
@@ -2219,9 +2219,9 @@ discard block |
||
2219 | 2219 | } |
2220 | 2220 | } else { |
2221 | 2221 | $predbSearch = Arr::get($this->manticore->searchIndexes('predb_rt', $this->_fileName, ['filename', 'title']), 'data'); |
2222 | - if (! empty($predbSearch)) { |
|
2222 | + if (!empty($predbSearch)) { |
|
2223 | 2223 | foreach ($predbSearch as $hit) { |
2224 | - if (! empty($hit)) { |
|
2224 | + if (!empty($hit)) { |
|
2225 | 2225 | $this->updateRelease($release, $hit['title'], 'PreDb: Filename match', $echo, $type, $nameStatus, $show); |
2226 | 2226 | |
2227 | 2227 | return true; |
@@ -2243,11 +2243,11 @@ discard block |
||
2243 | 2243 | $this->_fileName = $release->textstring; |
2244 | 2244 | $this->_cleanMatchFiles(); |
2245 | 2245 | $this->cleanFileNames(); |
2246 | - if (! empty($this->_fileName)) { |
|
2246 | + if (!empty($this->_fileName)) { |
|
2247 | 2247 | if (config('nntmux.elasticsearch_enabled') === true) { |
2248 | 2248 | $results = $this->elasticsearch->searchPreDb($this->_fileName); |
2249 | 2249 | foreach ($results as $hit) { |
2250 | - if (! empty($hit)) { |
|
2250 | + if (!empty($hit)) { |
|
2251 | 2251 | $this->updateRelease($release, $hit['title'], 'PreDb: Title match', $echo, $type, $nameStatus, $show, $hit['id']); |
2252 | 2252 | |
2253 | 2253 | return true; |
@@ -2255,9 +2255,9 @@ discard block |
||
2255 | 2255 | } |
2256 | 2256 | } else { |
2257 | 2257 | $results = Arr::get($this->manticore->searchIndexes('predb_rt', $this->_fileName, ['title']), 'data'); |
2258 | - if (! empty($results)) { |
|
2258 | + if (!empty($results)) { |
|
2259 | 2259 | foreach ($results as $hit) { |
2260 | - if (! empty($hit)) { |
|
2260 | + if (!empty($hit)) { |
|
2261 | 2261 | $this->updateRelease($release, $hit['title'], 'PreDb: Title match', $echo, $type, $nameStatus, $show); |
2262 | 2262 | |
2263 | 2263 | return true; |
@@ -2273,10 +2273,10 @@ discard block |
||
2273 | 2273 | private function cleanFileNames(): array|string|null |
2274 | 2274 | { |
2275 | 2275 | if (preg_match('/(\.[a-zA-Z]{2})?(\.4k|\.fullhd|\.hd|\.int|\.\d+)?$/i', $this->_fileName, $hit)) { |
2276 | - if (! empty($hit[1]) && preg_match('/\.[a-zA-Z]{2}/i', $hit[1])) { |
|
2276 | + if (!empty($hit[1]) && preg_match('/\.[a-zA-Z]{2}/i', $hit[1])) { |
|
2277 | 2277 | $this->_fileName = preg_replace('/\.[a-zA-Z]{2}\./i', '.', $this->_fileName); |
2278 | 2278 | } |
2279 | - if (! empty($hit[2])) { |
|
2279 | + if (!empty($hit[2])) { |
|
2280 | 2280 | if (preg_match('/\.4k$/', $hit[2])) { |
2281 | 2281 | $this->_fileName = preg_replace('/\.4k$/', '.2160p', $this->_fileName); |
2282 | 2282 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | public static function addData($id, MediaInfoContainer $xmlArray): void |
16 | 16 | { |
17 | 17 | $mediainfoArray = $xmlArray->getGeneral(); |
18 | - if (! $mediainfoArray) { |
|
18 | + if (!$mediainfoArray) { |
|
19 | 19 | return; |
20 | 20 | } |
21 | 21 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | { |
31 | 31 | $this->ensureIsNotRateLimited(); |
32 | 32 | |
33 | - if (! Auth::attempt($this->only(['email', 'password']), $this->remember)) { |
|
33 | + if (!Auth::attempt($this->only(['email', 'password']), $this->remember)) { |
|
34 | 34 | RateLimiter::hit($this->throttleKey()); |
35 | 35 | |
36 | 36 | throw ValidationException::withMessages([ |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | protected function ensureIsNotRateLimited(): void |
48 | 48 | { |
49 | - if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) { |
|
49 | + if (!RateLimiter::tooManyAttempts($this->throttleKey(), 5)) { |
|
50 | 50 | return; |
51 | 51 | } |
52 | 52 |