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

View File

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