feat: add hdr filtering (#86)

* feat: filter hdr content

* feat: check filter hdr

* feat: improve hdr parse and filter and tests
This commit is contained in:
Ludvig Lundgren 2022-01-16 13:50:21 +01:00 committed by GitHub
parent 67c6bd7b53
commit 284a2f9590
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 284 additions and 22 deletions

View file

@ -16,7 +16,7 @@ import { Action, ActionType, DownloadClient, Filter, Indexer } from "../../domai
import { useToggle } from "../../hooks/hooks";
import { useMutation, useQuery } from "react-query";
import { queryClient } from "../../App";
import { CONTAINER_OPTIONS, CODECS_OPTIONS, RESOLUTION_OPTIONS, SOURCES_OPTIONS, ActionTypeNameMap, ActionTypeOptions } from "../../domain/constants";
import { CONTAINER_OPTIONS, CODECS_OPTIONS, RESOLUTION_OPTIONS, SOURCES_OPTIONS, ActionTypeNameMap, ActionTypeOptions, HDR_OPTIONS } from "../../domain/constants";
import DEBUG from "../../components/debug";
import { TitleSubtitle } from "../../components/headings";
@ -233,6 +233,8 @@ export default function FilterDetails() {
sources: data.sources || [],
codecs: data.codecs || [],
containers: data.containers || [],
match_hdr: data.match_hdr || [],
except_hdr: data.except_hdr || [],
seasons: data.seasons,
episodes: data.episodes,
match_releases: data.match_releases,
@ -393,6 +395,11 @@ function MoviesTv() {
<MultiSelect name="codecs" options={CODECS_OPTIONS} label="codecs" columns={6} />
<MultiSelect name="containers" options={CONTAINER_OPTIONS} label="containers" columns={6} />
</div>
<div className="mt-6 grid grid-cols-12 gap-6">
<MultiSelect name="match_hdr" options={HDR_OPTIONS} label="Match HDR" columns={6} />
<MultiSelect name="except_hdr" options={HDR_OPTIONS} label="Except HDR" columns={6} />
</div>
</div>
</div>
)