@@ -25,7 +25,7 @@ |
||
25 | 25 | WHERE r.nzbstatus = 1 AND r.jpgstatus = 0 AND r.categories_id IN (%s, %s, %s) ORDER BY r.adddate DESC', Category::XXX_CLIPHD, Category::XXX_CLIPSD, Category::XXX_UHD)); |
26 | 26 | foreach ($res as $row) { |
27 | 27 | $nzbpath = $path2cover.$row['guid'].'_thumb.jpg'; |
28 | - if (! file_exists($nzbpath)) { |
|
28 | + if (!file_exists($nzbpath)) { |
|
29 | 29 | $counterfixed++; |
30 | 30 | if ($argv[1] === 'true') { |
31 | 31 | $imgpath = 'http://pic4all.eu/images/'.$row['searchname'].'_1.jpg'; |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | $qry = MovieInfo::query()->where('cover', '=', 1)->select(['imdbid'])->get(); |
52 | 52 | foreach ($qry as $rows) { |
53 | - if (! is_file($path2covers.$rows['imdbid'].'-cover.jpg')) { |
|
53 | + if (!is_file($path2covers.$rows['imdbid'].'-cover.jpg')) { |
|
54 | 54 | MovieInfo::query()->where('cover', '=', 1)->where('imdbid', $rows['imdbid'])->update(['cover' => 0]); |
55 | 55 | $colorCli->info($path2covers.$rows['imdbid'].'-cover.jpg does not exist.'); |
56 | 56 | $deleted++; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | } |
59 | 59 | $qry1 = MovieInfo::query()->where('backdrop', '=', 1)->select(['imdbid'])->get(); |
60 | 60 | foreach ($qry1 as $rows) { |
61 | - if (! is_file($path2covers.$rows['imdbid'].'-backdrop.jpg')) { |
|
61 | + if (!is_file($path2covers.$rows['imdbid'].'-backdrop.jpg')) { |
|
62 | 62 | MovieInfo::query()->where('backdrop', '=', 1)->where('imdbid', $rows['imdbid'])->update(['backdrop' => 0]); |
63 | 63 | $colorCli->climate()->info($path2covers.$rows['imdbid'].'-backdrop.jpg does not exist.'); |
64 | 64 | $deleted++; |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | $qry = ConsoleInfo::query()->where('cover', '=', 1)->value('id'); |
43 | 43 | foreach ($qry as $rows) { |
44 | - if (! is_file($path2covers.$rows['id'].'.jpg')) { |
|
44 | + if (!is_file($path2covers.$rows['id'].'.jpg')) { |
|
45 | 45 | ConsoleInfo::query()->where( |
46 | 46 | [ |
47 | 47 | ['cover' => 1], |
@@ -28,12 +28,12 @@ |
||
28 | 28 | |
29 | 29 | foreach ($res as $row) { |
30 | 30 | $nzbpath = $path2cover.$row->imdbid.'-cover.jpg'; |
31 | - if (! file_exists($nzbpath)) { |
|
31 | + if (!file_exists($nzbpath)) { |
|
32 | 32 | $counterfixed++; |
33 | 33 | $colorCli->warning('Missing cover '.$nzbpath); |
34 | 34 | if ($argv[1] === 'true') { |
35 | 35 | $cover = $movie->updateMovieInfo($row->imdbid); |
36 | - if ($cover === false || ! file_exists($nzbpath)) { |
|
36 | + if ($cover === false || !file_exists($nzbpath)) { |
|
37 | 37 | DB::update(sprintf('UPDATE movieinfo m SET m.cover = 0 WHERE m.imdbid = %d', $row->imdbid)); |
38 | 38 | } |
39 | 39 | } |
@@ -18,13 +18,13 @@ |
||
18 | 18 | $neededPerms = ['preview', 'hideads', 'edit release', 'view console', 'view movies', 'view audio', 'view pc', 'view tv', 'view adult', 'view books', 'view other']; |
19 | 19 | |
20 | 20 | foreach ($neededPerms as $neededPerm) { |
21 | - if (! in_array($neededPerm, $permissions, false)) { |
|
21 | + if (!in_array($neededPerm, $permissions, false)) { |
|
22 | 22 | Permission::create(['name' => $neededPerm]); |
23 | 23 | } |
24 | 24 | } |
25 | 25 | |
26 | 26 | foreach ($oldRoles as $oldRole) { |
27 | - if (! in_array($oldRole->name, $roles, false)) { |
|
27 | + if (!in_array($oldRole->name, $roles, false)) { |
|
28 | 28 | $role = Role::create( |
29 | 29 | [ |
30 | 30 | 'name' => $oldRole->name, |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Blacklight\IRCScraper; |
6 | 6 | |
7 | -if (! isset($argv[1]) || $argv[1] !== 'true') { |
|
7 | +if (!isset($argv[1]) || $argv[1] !== 'true') { |
|
8 | 8 | exit( |
9 | 9 | 'Argument 1: (required) false|true ; false prints this help screen, true runs the scraper.'.PHP_EOL. |
10 | 10 | 'Argument 2: (optional) false|true ; true runs in silent mode (no text output)'.PHP_EOL. |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | //reset collections dateadded to now if dateadded > delay time check |
21 | 21 | $colorCli->header('Resetting collections that have expired to this moment. This could take some time if many collections need to be reset'); |
22 | 22 | |
23 | -DB::transaction(function () use ($delaytime) { |
|
23 | +DB::transaction(function() use ($delaytime) { |
|
24 | 24 | Collection::query()->where('dateadded', '<', now()->subHours($delaytime))->update(['dateadded' => now()]); |
25 | 25 | }, 10); |
26 | 26 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | //check for apps |
35 | 35 | $apps = ['time', 'tmux', 'nice', 'tee']; |
36 | 36 | foreach ($apps as &$value) { |
37 | - if (! command_exist($value)) { |
|
37 | + if (!command_exist($value)) { |
|
38 | 38 | $colorCli->error('Tmux scripts require '.$value.' but its not installed. Aborting.'); |
39 | 39 | exit(); |
40 | 40 | } |
@@ -77,7 +77,7 @@ |
||
77 | 77 | $runVar['settings'] = (array) Arr::first(DB::select($tRun->getMonitorSettings())); |
78 | 78 | $runVar['timers']['query']['tmux_time'] = (time() - $timer01); |
79 | 79 | |
80 | - $runVar['settings']['book_reqids'] = (! empty($runVar['settings']['book_reqids']) |
|
80 | + $runVar['settings']['book_reqids'] = (!empty($runVar['settings']['book_reqids']) |
|
81 | 81 | ? $runVar['settings']['book_reqids'] : Category::BOOKS_ROOT); |
82 | 82 | |
83 | 83 | //get usenet connection info |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Blacklight\libraries\ForkingImportNZB; |
6 | 6 | |
7 | -if (! isset($argv[1]) || ! is_dir($argv[1])) { |
|
7 | +if (!isset($argv[1]) || !is_dir($argv[1])) { |
|
8 | 8 | exit( |
9 | 9 | 'First argument (mandatory):'.PHP_EOL. |
10 | 10 | 'Path to a folder, containing folders with .nzb or .nzb.gz files inside them.'.PHP_EOL. |