feat(filters): RED and OPS fetch record label from API (#1881)

* feat(filters): RED and OPS fetch record label from API

* test: add record label to RED and OPS test data

* refactor: record label check

---------

Co-authored-by: ze0s <ze0s@riseup.net>
This commit is contained in:
soup 2024-12-25 13:39:03 +01:00 committed by GitHub
parent 221bc35371
commit d153ac44b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 380 additions and 154 deletions

View file

@ -431,6 +431,8 @@ export const FilterDetails = () => {
except_tags_match_logic: filter.except_tags_match_logic,
match_uploaders: filter.match_uploaders,
except_uploaders: filter.except_uploaders,
match_record_labels: filter.match_record_labels,
except_record_labels: filter.except_record_labels,
match_language: filter.match_language || [],
except_language: filter.except_language || [],
freeleech: filter.freeleech,

View file

@ -43,6 +43,30 @@ export const Music = () => {
</div>
}
/>
<TextAreaAutoResize
name="match_record_labels"
label="Match record labels"
columns={6}
placeholder="eg. Anjunabeats, Armada"
tooltip={
<div>
<p>Comma separated list of record labels to match. Only Orpheus and Redacted support this.</p>
<DocsLink href="https://autobrr.com/filters#music" />
</div>
}
/>
<TextAreaAutoResize
name="except_record_labels"
label="Except record labels"
columns={6}
placeholder="eg. Anjunadeep, Armind"
tooltip={
<div>
<p>Comma separated list of record labels to ignore (takes priority over Match record labels). Only Orpheus and Redacted support this.</p>
<DocsLink href="https://autobrr.com/filters#music" />
</div>
}
/>
</FilterLayout>
</FilterSection>
@ -168,8 +192,8 @@ export const Music = () => {
<div className="col-span-12 flex items-center justify-center">
<span className="border-b border-gray-150 dark:border-gray-750 w-full" />
<span className="flex mx-2 shrink-0 text-lg font-bold uppercase tracking-wide text-gray-700 dark:text-gray-200">
OR
</span>
OR
</span>
<span className="border-b border-gray-150 dark:border-gray-750 w-full" />
</div>
@ -188,8 +212,8 @@ export const Music = () => {
/>
<span className="col-span-12 sm:col-span-6 self-center ml-0 text-center sm:text-left text-sm text-gray-500 dark:text-gray-425 underline underline-offset-2">
This is what you want in 90% of cases (instead of options above).
</span>
This is what you want in 90% of cases (instead of options above).
</span>
</FilterLayout>
</FilterSection>
</FilterPage>

View file

@ -62,6 +62,8 @@ interface Filter {
except_categories: string;
match_uploaders: string;
except_uploaders: string;
match_record_labels: string;
except_record_labels: string;
match_language: string[];
except_language: string[];
tags: string;