Skip to content

Commit

Permalink
Handle legacy scene movies criterion in saved filters (#5348)
Browse files Browse the repository at this point in the history
  • Loading branch information
WithoutPants authored Oct 6, 2024
1 parent 4697271 commit 7199d2b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
10 changes: 10 additions & 0 deletions ui/v2.5/src/models/list-filter/criteria/groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
});
6 changes: 5 additions & 1 deletion ui/v2.5/src/models/list-filter/scenes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -106,6 +109,7 @@ const criterionOptions = [
// StudioTagsCriterionOption,
StudiosCriterionOption,
GroupsCriterionOption,
LegacyMoviesCriterionOption,
GalleriesCriterionOption,
createStringCriterionOption("url"),
StashIDCriterionOption,
Expand Down
1 change: 1 addition & 0 deletions ui/v2.5/src/models/list-filter/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export type CriterionType =
| "studios"
| "scenes"
| "groups"
| "movies" // legacy
| "containing_groups"
| "containing_group_count"
| "sub_groups"
Expand Down

0 comments on commit 7199d2b

Please sign in to comment.