fix StyleCI

This commit is contained in:
Jay Sizzla
2021-12-06 21:32:00 +01:00
parent 556e596b63
commit a644a544c6
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ class ProcessBasicAnnounceRequest implements ShouldQueue
if (\config('other.freeleech') == 1 || $personalFreeleech || $this->user->group->is_freeleech == 1 || $freeleechToken) {
$modDownloaded = 0;
} elseif ($this->torrent->free > 1) {
// FL value in DB are from 0% to 100%.
// FL value in DB are from 0% to 100%.
// Divide it by 100 and multiply it with "downloaded" to get discount download.
$fl_discount = $this->torrent->free / 100;
$modDownloaded = $downloaded * $fl_discount;
+1 -1
View File
@@ -105,7 +105,7 @@ class ProcessCompletedAnnounceRequest implements ShouldQueue
if (\config('other.freeleech') == 1 || $personalFreeleech || $this->user->group->is_freeleech == 1 || $freeleechToken) {
$modDownloaded = 0;
} elseif ($this->torrent->free > 1) {
// FL value in DB are from 0% to 100%.
// FL value in DB are from 0% to 100%.
// Divide it by 100 and multiply it with "downloaded" to get discount download.
$fl_discount = $this->torrent->free / 100;
$modDownloaded = $downloaded * $fl_discount;
+1 -1
View File
@@ -105,7 +105,7 @@ class ProcessStoppedAnnounceRequest implements ShouldQueue
if (\config('other.freeleech') == 1 || $personalFreeleech || $this->user->group->is_freeleech == 1 || $freeleechToken) {
$modDownloaded = 0;
} elseif ($this->torrent->free > 1) {
// FL value in DB are from 0% to 100%.
// FL value in DB are from 0% to 100%.
// Divide it by 100 and multiply it with "downloaded" to get discount download.
$fl_discount = $this->torrent->free / 100;
$modDownloaded = $downloaded * $fl_discount;
@@ -39,7 +39,7 @@ class AddMoreTorrentPromos extends Migration
// Change all "free->100" torrents to "free->1" for now FL discounts
$fl_torrents = DB::table('torrents')->select('id', 'free')->where('free', '>', 1)->get();
$i = 0;
foreach ($fl_torrents as $torrent){
foreach ($fl_torrents as $torrent) {
DB::table('torrents')
->where('id', $torrent->id)
->update([