@@ -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 |