Add support for using freeleech tokens if available

This commit is contained in:
Daniel Mason 2025-07-11 10:12:43 +12:00
parent 74f777340e
commit 1242c19883
Signed by: idanoo
GPG key ID: 387387CDBC02F132
21 changed files with 88 additions and 34 deletions

View file

@ -437,6 +437,7 @@ export const FilterDetails = () => {
except_language: filter.except_language || [],
freeleech: filter.freeleech,
freeleech_percent: filter.freeleech_percent,
freeleech_token: filter.freeleech_token,
formats: filter.formats || [],
quality: filter.quality || [],
media: filter.media || [],

View file

@ -14,6 +14,7 @@ export const FILTER_FIELDS: Record<string, string> = {
"scene": "boolean",
"smart_episode": "boolean",
"freeleech": "boolean",
"freeleech_token": "boolean",
"perfect_flac": "boolean",
"download_duplicates": "boolean",
"cue": "boolean",

View file

@ -354,7 +354,7 @@ const Freeleech = () => {
return (
<CollapsibleSection
defaultOpen={values.freeleech || values.freeleech_percent !== undefined}
defaultOpen={values.freeleech || values.freeleech_token || values.freeleech_percent !== undefined}
title="Freeleech"
subtitle="Match based off freeleech (if announced)"
>
@ -401,6 +401,21 @@ const Freeleech = () => {
}
/>
</FilterHalfRow>
<FilterHalfRow>
<SwitchGroup
name="freeleech_token"
label="Freeleech Tokens"
className="py-0"
description="Use freeleech tokens."
tooltip={
<div>
<p>
Use freelech tokens for downloads if supported bt the tracker.
</p>
</div>
}
/>
</FilterHalfRow>
</CollapsibleSection>
);
}

View file

@ -32,6 +32,7 @@ interface Filter {
except_origins: string[];
freeleech: boolean;
freeleech_percent: string;
freeleech_token: boolean;
shows: string;
seasons: string;
episodes: string;