Handle legacy scene movies criterion in saved filters (#5348)

This commit is contained in:
WithoutPants 2024-10-07 10:19:36 +11:00 committed by GitHub
parent 4697271294
commit 7199d2b5ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 1 deletions

View file

@ -42,3 +42,13 @@ export const SubGroupsCriterionOption = new BaseGroupsCriterionOption(
"sub_groups", "sub_groups",
"sub_groups" "sub_groups"
); );
// redirects to GroupsCriterion
export const LegacyMoviesCriterionOption = new CriterionOption({
messageID: "groups",
type: "movies",
modifierOptions,
defaultModifier,
inputType,
makeCriterion: () => new GroupsCriterion(GroupsCriterionOption),
});

View file

@ -8,7 +8,10 @@ import {
} from "./criteria/criterion"; } from "./criteria/criterion";
import { HasMarkersCriterionOption } from "./criteria/has-markers"; import { HasMarkersCriterionOption } from "./criteria/has-markers";
import { SceneIsMissingCriterionOption } from "./criteria/is-missing"; import { SceneIsMissingCriterionOption } from "./criteria/is-missing";
import { GroupsCriterionOption } from "./criteria/groups"; import {
GroupsCriterionOption,
LegacyMoviesCriterionOption,
} from "./criteria/groups";
import { GalleriesCriterionOption } from "./criteria/galleries"; import { GalleriesCriterionOption } from "./criteria/galleries";
import { OrganizedCriterionOption } from "./criteria/organized"; import { OrganizedCriterionOption } from "./criteria/organized";
import { PerformersCriterionOption } from "./criteria/performers"; import { PerformersCriterionOption } from "./criteria/performers";
@ -106,6 +109,7 @@ const criterionOptions = [
// StudioTagsCriterionOption, // StudioTagsCriterionOption,
StudiosCriterionOption, StudiosCriterionOption,
GroupsCriterionOption, GroupsCriterionOption,
LegacyMoviesCriterionOption,
GalleriesCriterionOption, GalleriesCriterionOption,
createStringCriterionOption("url"), createStringCriterionOption("url"),
StashIDCriterionOption, StashIDCriterionOption,

View file

@ -148,6 +148,7 @@ export type CriterionType =
| "studios" | "studios"
| "scenes" | "scenes"
| "groups" | "groups"
| "movies" // legacy
| "containing_groups" | "containing_groups"
| "containing_group_count" | "containing_group_count"
| "sub_groups" | "sub_groups"