Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Update) Override freeleech & doubleup tags when featured #4436

Open
wants to merge 8 commits into
base: 8.x.x
Choose a base branch
from
10 changes: 8 additions & 2 deletions app/DTO/TorrentSearchFiltersDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,18 @@ final public function toMeilisearchFilter(): array

if ($this->free !== []) {
if (!config('other.freeleech')) {
$filters[] = 'free IN '.json_encode(array_map('intval', $this->free));
$filters[] = [
'free IN '.json_encode(array_map('intval', $this->free)),
'featured = true',
];
}
}

if ($this->doubleup) {
$filters[] = 'doubleup = true';
$filters[] = [
'doubleup = true',
'featured = true',
];
}

if ($this->featured) {
Expand Down