Skip to content

Commit e0440da

Browse files
authored
Merge pull request #1178 from HDInnovations/development
(Tests) Console Commands
2 parents d2ea6a1 + b1388e3 commit e0440da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+304
-222
lines changed

.env.testing

+2
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ PUSHER_APP_ID=
3535
PUSHER_APP_KEY=
3636
PUSHER_APP_SECRET=
3737
PUSHER_APP_CLUSTER=mt1
38+
39+
TMDB_API_KEY=aa8b43b8cbce9d1689bef3d0c3087e4d

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ services:
2525

2626
script:
2727
- mkdir -p build/logs
28-
- phpdbg -qrr vendor/bin/phpunit --configuration phpunit.xml --coverage-clover build/logs/clover.xml
28+
- vendor/bin/phpunit --configuration phpunit.xml --coverage-clover build/logs/clover.xml
2929

3030
after_success:
3131
- travis_retry php vendor/bin/php-coveralls

app/Console/Commands/AutoBan.php

+1
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,6 @@ public function handle()
7474
Mail::to($ban->warneduser->email)->send(new BanUser($ban->warneduser->email, $logban));
7575
}
7676
}
77+
$this->comment('Automated User Banning Command Complete');
7778
}
7879
}

app/Console/Commands/AutoBonAllocation.php

+1
Original file line numberDiff line numberDiff line change
@@ -263,5 +263,6 @@ public function handle()
263263
$user->seedbonus += $value;
264264
$user->save();
265265
}
266+
$this->comment('Automated BON Allocation Command Complete');
266267
}
267268
}

app/Console/Commands/AutoCorrectHistory.php

+1
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,6 @@ public function handle()
5858
$h->seeder = false;
5959
$h->save();
6060
}
61+
$this->comment('Automated History Record Correction Command Complete');
6162
}
6263
}

app/Console/Commands/AutoDeactivateWarning.php

+1
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,6 @@ public function handle()
5757
$pm->message = 'The [b]WARNING[/b] you received relating to Torrent '.$warning->torrenttitle->name.' has expired! Try not to get more! [color=red][b]THIS IS AN AUTOMATED SYSTEM MESSAGE, PLEASE DO NOT REPLY![/b][/color]';
5858
$pm->save();
5959
}
60+
$this->comment('Automated Warning Deativation Command Complete');
6061
}
6162
}

app/Console/Commands/AutoDisableInactiveUsers.php

+1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,6 @@ public function handle()
7272
}
7373
}
7474
}
75+
$this->comment('Automated User Disable Command Complete');
7576
}
7677
}

app/Console/Commands/AutoFlushPeers.php

+1
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,6 @@ public function handle()
6262
}
6363
$peer->delete();
6464
}
65+
$this->comment('Automated Flush Ghost Peers Command Complete');
6566
}
6667
}

app/Console/Commands/AutoGraveyard.php

+1
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,6 @@ public function handle()
9595
$pm->save();
9696
}
9797
}
98+
$this->comment('Automated Graveyard Rewards Command Complete');
9899
}
99100
}

app/Console/Commands/AutoGroup.php

+1
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,6 @@ public function handle()
105105
$user->save();
106106
}
107107
}
108+
$this->comment('Automated User Group Command Complete');
108109
}
109110
}

app/Console/Commands/AutoHighspeedTag.php

+1
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,6 @@ public function handle()
5757
unset($torrent);
5858
}
5959
}
60+
$this->comment('Automated High Speed Torrents Command Complete');
6061
}
6162
}

app/Console/Commands/AutoNerdStat.php

+1
Original file line numberDiff line numberDiff line change
@@ -143,5 +143,6 @@ public function handle()
143143
// Auto Shout Nerd Stat
144144
$this->chat->systemMessage(sprintf('%s', $statArray[$selected]), 2);
145145
}
146+
$this->comment('Automated Nerd Stat Command Complete');
146147
}
147148
}

app/Console/Commands/AutoPreWarning.php

+1
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,6 @@ public function handle()
8181
}
8282
}
8383
}
84+
$this->comment('Automated User Pre-Warning Command Complete');
8485
}
8586
}

app/Console/Commands/AutoRecycleAudits.php

+1
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@ public function handle()
4646
foreach ($audits as $audit) {
4747
$audit->delete();
4848
}
49+
$this->comment('Automated Purge Old Audits Command Complete');
4950
}
5051
}

app/Console/Commands/AutoRecycleClaimedTorrentRequests.php

+1
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,6 @@ public function handle()
7676
$torrentRequest->save();
7777
}
7878
}
79+
$this->comment('Automated Request Claim Reset Command Complete');
7980
}
8081
}

app/Console/Commands/AutoRecycleFailedLogins.php

+1
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@ public function handle()
4646
foreach ($failedLogins as $failedLogin) {
4747
$failedLogin->delete();
4848
}
49+
$this->comment('Automated Purge Old Failed Logins Command Complete');
4950
}
5051
}

app/Console/Commands/AutoRecycleInvites.php

+1
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@ public function handle()
4646
foreach ($invites as $invite) {
4747
$invite->delete();
4848
}
49+
$this->comment('Automated Purge Unaccepted Invites Command Complete');
4950
}
5051
}

app/Console/Commands/AutoRemoveFeaturedTorrent.php

+1
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,6 @@ public function handle()
7575
// Delete The Record From DB
7676
$featured_torrent->delete();
7777
}
78+
$this->comment('Automated Removal Featured Torrents Command Complete');
7879
}
7980
}

app/Console/Commands/AutoRemovePersonalFreeleech.php

+1
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,6 @@ public function handle()
5656
// Delete The Record From DB
5757
$pfl->delete();
5858
}
59+
$this->comment('Automated Removal User Personal Freeleech Command Complete');
5960
}
6061
}

app/Console/Commands/AutoRevokePermissions.php

+1
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,6 @@ public function handle()
7070
$deny->warneduser->save();
7171
}
7272
}
73+
$this->comment('Automated User Permissions Revoke Command Complete');
7374
}
7475
}

app/Console/Commands/AutoSoftDeleteDisabledUsers.php

+1
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,6 @@ public function handle()
7171
$user->delete();
7272
}
7373
}
74+
$this->comment('Automated Soft Delete Disabled Users Command Complete');
7475
}
7576
}

app/Console/Commands/AutoWarning.php

+1
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,6 @@ public function handle()
9090
}
9191
}
9292
}
93+
$this->comment('Automated User Warning Command Complete');
9394
}
9495
}

app/Console/Commands/DemoSeed.php

+151-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function __construct()
5252
*/
5353
public function handle()
5454
{
55-
$this->alert('Demo Seeder v1.0 (Author: Poppabear)');
55+
$this->alert('Demo Seeder v2.0 (Author: Poppabear)');
5656
$this->warn('*** This process could take a few minutes ***');
5757
$this->warn('Press CTRL + C to abort');
5858

@@ -81,6 +81,156 @@ public function handle()
8181
'slug' => Str::slug($r->title),
8282
'description' => $r->plot,
8383
'category_id' => 1,
84+
'featured' => false,
85+
'mediainfo' => '
86+
Complete name : Double.Impact.1991.1080p.BluRay.DD+5.1.x264-LoRD.mkv
87+
Format : Matroska
88+
Format version : Version 4
89+
File size : 14.1 GiB
90+
Duration : 1 h 49 min
91+
Overall bit rate : 18.5 Mb/s
92+
Encoded date : UTC 2020-02-24 10:07:15
93+
Writing application : mkvmerge v43.0.0 (\'The Quartermaster\') 64-bit
94+
Writing library : libebml v1.3.10 + libmatroska v1.5.2
95+
96+
Video
97+
ID : 1
98+
Format : AVC
99+
Format/Info : Advanced Video Codec
100+
Format profile : [email protected]
101+
Format settings : CABAC / 4 Ref Frames
102+
Format settings, CABAC : Yes
103+
Format settings, Reference frames : 4 frames
104+
Codec ID : V_MPEG4/ISO/AVC
105+
Duration : 1 h 49 min
106+
Bit rate : 17.5 Mb/s
107+
Width : 1 920 pixels
108+
Height : 1 040 pixels
109+
Display aspect ratio : 1.85:1
110+
Frame rate mode : Constant
111+
Frame rate : 23.976 (24000/1001) FPS
112+
Color space : YUV
113+
Chroma subsampling : 4:2:0
114+
Bit depth : 8 bits
115+
Scan type : Progressive
116+
Bits/(Pixel*Frame) : 0.366
117+
Stream size : 13.4 GiB (94%)
118+
Title : LoRD
119+
Writing library : x264 core 159 r2991+49 ~ LoRD
120+
Encoding settings : cabac=1 / ref=4 / deblock=1:-3:-3 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / fade_compensate=0.00 / psy_rd=1.10:0.00 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / fgo=0 / bframes=9 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=0 / bitrate=17500 / ratetol=1.0 / qcomp=0.70 / qpmin=0:0:0 / qpmax=69:69:69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=62500 / vbv_bufsize=78125 / nal_hrd=none / filler=0 / ip_ratio=1.25 / pb_ratio=1.20 / aq=3:0.55 / aq-sensitivity=10.00 / aq-factor=1.00:1.00:1.00 / aq2=0 / aq3=0
121+
Language : English
122+
Default : Yes
123+
Forced : No
124+
125+
Audio
126+
ID : 2
127+
Format : E-AC-3
128+
Format/Info : Enhanced AC-3
129+
Commercial name : Dolby Digital Plus
130+
Codec ID : A_EAC3
131+
Duration : 1 h 49 min
132+
Bit rate mode : Constant
133+
Bit rate : 1 023 kb/s
134+
Channel(s) : 6 channels
135+
Channel layout : L R C LFE Ls Rs
136+
Sampling rate : 48.0 kHz
137+
Frame rate : 93.750 FPS (512 SPF)
138+
Compression mode : Lossy
139+
Stream size : 803 MiB (6%)
140+
Title : DD+5.1
141+
Language : English
142+
Service kind : Complete Main
143+
Default : Yes
144+
Forced : No
145+
146+
Text #1
147+
ID : 3
148+
Format : UTF-8
149+
Codec ID : S_TEXT/UTF8
150+
Codec ID/Info : UTF-8 Plain Text
151+
Duration : 1 h 41 min
152+
Bit rate : 26 b/s
153+
Count of elements : 669
154+
Stream size : 19.9 KiB (0%)
155+
Language : English
156+
Default : No
157+
Forced : No
158+
159+
Text #2
160+
ID : 4
161+
Format : UTF-8
162+
Codec ID : S_TEXT/UTF8
163+
Codec ID/Info : UTF-8 Plain Text
164+
Duration : 1 h 48 min
165+
Bit rate : 30 b/s
166+
Count of elements : 872
167+
Stream size : 24.1 KiB (0%)
168+
Title : SDH
169+
Language : English
170+
Default : No
171+
Forced : No
172+
173+
Text #3
174+
ID : 5
175+
Format : UTF-8
176+
Codec ID : S_TEXT/UTF8
177+
Codec ID/Info : UTF-8 Plain Text
178+
Duration : 1 h 41 min
179+
Bit rate : 26 b/s
180+
Count of elements : 659
181+
Stream size : 19.9 KiB (0%)
182+
Language : French
183+
Default : No
184+
Forced : No
185+
186+
Text #4
187+
ID : 6
188+
Format : UTF-8
189+
Codec ID : S_TEXT/UTF8
190+
Codec ID/Info : UTF-8 Plain Text
191+
Duration : 1 h 41 min
192+
Bit rate : 24 b/s
193+
Count of elements : 668
194+
Stream size : 18.3 KiB (0%)
195+
Title : european
196+
Language : Portuguese
197+
Default : No
198+
Forced : No
199+
200+
Text #5
201+
ID : 7
202+
Format : UTF-8
203+
Codec ID : S_TEXT/UTF8
204+
Codec ID/Info : UTF-8 Plain Text
205+
Duration : 1 h 42 min
206+
Bit rate : 26 b/s
207+
Count of elements : 765
208+
Stream size : 19.5 KiB (0%)
209+
Title : latin
210+
Language : Spanish
211+
Default : No
212+
Forced : No
213+
214+
Menu
215+
00:00:00.000 : en:Logo/Title/Intro
216+
00:03:24.037 : en:"My Babies!"
217+
00:09:45.918 : en:Life In L.A.
218+
00:13:08.621 : en:"He\'s Your Brother!"
219+
00:21:01.510 : en:Fencing Benzes
220+
00:29:05.118 : en:Mistaken Identity
221+
00:37:34.627 : en:Fishing Expedition
222+
00:42:22.039 : en:The Drop
223+
00:50:05.711 : en:Bad Cognac
224+
00:58:56.032 : en:On the Run
225+
01:07:33.549 : en:Sibling Rivalry
226+
01:17:59.174 : en:Hotel Invasion
227+
01:23:51.443 : en:A Captive Audience
228+
01:28:49.532 : en:One-On-One Combat
229+
01:34:15.858 : en:Who Gets Away?
230+
01:44:15.249 : en:End Credits
231+
',
232+
'created_at' => now(),
233+
'updated_at' => now(),
84234
]);
85235
} catch (Exception $e) {
86236
$abort = true;

app/Console/Commands/FetchGenres.php

+1
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,6 @@ public function handle()
7777
// sleep for 1 second
7878
sleep(1);
7979
}
80+
$this->comment('Torrent Genres Command Complete');
8081
}
8182
}

app/Console/Commands/FetchReleaseYears.php

+1
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,6 @@ public function handle()
126126
// sleep for 1 second
127127
sleep(1);
128128
}
129+
$this->comment('Torrent Release Year Command Complete');
129130
}
130131
}

app/Console/Commands/SyncPeers.php

+1
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,6 @@ public function handle()
5959
$torrent->leechers = $torrent->peers->where('left', '>', '0')->count();
6060
$torrent->save();
6161
}
62+
$this->comment('Torrent Peer Syncing Command Complete');
6263
}
6364
}

0 commit comments

Comments
 (0)