mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Add group graphql interfaces (#5017)
* Deprecate movie and add group interfaces * UI changes
This commit is contained in:
@@ -87,7 +87,7 @@ export const StudioIsMissingCriterionOption = new IsMissingCriterionOption(
|
||||
["image", "stash_id", "details"]
|
||||
);
|
||||
|
||||
export const MovieIsMissingCriterionOption = new IsMissingCriterionOption(
|
||||
export const GroupIsMissingCriterionOption = new IsMissingCriterionOption(
|
||||
"isMissing",
|
||||
"is_missing",
|
||||
["front_image", "back_image", "scenes"]
|
||||
|
||||
@@ -2,16 +2,16 @@ import { ILabeledIdCriterion, ILabeledIdCriterionOption } from "./criterion";
|
||||
|
||||
const inputType = "groups";
|
||||
|
||||
export const MoviesCriterionOption = new ILabeledIdCriterionOption(
|
||||
export const GroupsCriterionOption = new ILabeledIdCriterionOption(
|
||||
"groups",
|
||||
"groups",
|
||||
"movies",
|
||||
false,
|
||||
inputType,
|
||||
() => new MoviesCriterion()
|
||||
() => new GroupsCriterion()
|
||||
);
|
||||
|
||||
export class MoviesCriterion extends ILabeledIdCriterion {
|
||||
export class GroupsCriterion extends ILabeledIdCriterion {
|
||||
constructor() {
|
||||
super(MoviesCriterionOption);
|
||||
super(GroupsCriterionOption);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { FilterMode } from "src/core/generated-graphql";
|
||||
import { ListFilterOptions } from "./filter-options";
|
||||
import { GalleryListFilterOptions } from "./galleries";
|
||||
import { ImageListFilterOptions } from "./images";
|
||||
import { MovieListFilterOptions } from "./movies";
|
||||
import { GroupListFilterOptions } from "./movies";
|
||||
import { PerformerListFilterOptions } from "./performers";
|
||||
import { SceneMarkerListFilterOptions } from "./scene-markers";
|
||||
import { SceneListFilterOptions } from "./scenes";
|
||||
@@ -22,7 +22,8 @@ export function getFilterOptions(mode: FilterMode): ListFilterOptions {
|
||||
case FilterMode.SceneMarkers:
|
||||
return SceneMarkerListFilterOptions;
|
||||
case FilterMode.Movies:
|
||||
return MovieListFilterOptions;
|
||||
case FilterMode.Groups:
|
||||
return GroupListFilterOptions;
|
||||
case FilterMode.Tags:
|
||||
return TagListFilterOptions;
|
||||
case FilterMode.Images:
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
createDurationCriterionOption,
|
||||
createMandatoryNumberCriterionOption,
|
||||
} from "./criteria/criterion";
|
||||
import { MovieIsMissingCriterionOption } from "./criteria/is-missing";
|
||||
import { GroupIsMissingCriterionOption } from "./criteria/is-missing";
|
||||
import { StudiosCriterionOption } from "./criteria/studios";
|
||||
import { PerformersCriterionOption } from "./criteria/performers";
|
||||
import { ListFilterOptions } from "./filter-options";
|
||||
@@ -35,7 +35,7 @@ const displayModeOptions = [DisplayMode.Grid];
|
||||
const criterionOptions = [
|
||||
// StudioTagsCriterionOption,
|
||||
StudiosCriterionOption,
|
||||
MovieIsMissingCriterionOption,
|
||||
GroupIsMissingCriterionOption,
|
||||
createStringCriterionOption("url"),
|
||||
createStringCriterionOption("name"),
|
||||
createStringCriterionOption("director"),
|
||||
@@ -50,7 +50,7 @@ const criterionOptions = [
|
||||
createMandatoryTimestampCriterionOption("updated_at"),
|
||||
];
|
||||
|
||||
export const MovieListFilterOptions = new ListFilterOptions(
|
||||
export const GroupListFilterOptions = new ListFilterOptions(
|
||||
defaultSortBy,
|
||||
sortByOptions,
|
||||
displayModeOptions,
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from "./criteria/criterion";
|
||||
import { HasMarkersCriterionOption } from "./criteria/has-markers";
|
||||
import { SceneIsMissingCriterionOption } from "./criteria/is-missing";
|
||||
import { MoviesCriterionOption } from "./criteria/movies";
|
||||
import { GroupsCriterionOption } from "./criteria/movies";
|
||||
import { GalleriesCriterionOption } from "./criteria/galleries";
|
||||
import { OrganizedCriterionOption } from "./criteria/organized";
|
||||
import { PerformersCriterionOption } from "./criteria/performers";
|
||||
@@ -105,7 +105,7 @@ const criterionOptions = [
|
||||
PerformerFavoriteCriterionOption,
|
||||
// StudioTagsCriterionOption,
|
||||
StudiosCriterionOption,
|
||||
MoviesCriterionOption,
|
||||
GroupsCriterionOption,
|
||||
GalleriesCriterionOption,
|
||||
createStringCriterionOption("url"),
|
||||
StashIDCriterionOption,
|
||||
|
||||
@@ -62,7 +62,7 @@ const criterionOptions = [
|
||||
createMandatoryNumberCriterionOption("gallery_count"),
|
||||
createMandatoryNumberCriterionOption("performer_count"),
|
||||
createMandatoryNumberCriterionOption("studio_count"),
|
||||
createMandatoryNumberCriterionOption("movie_count", "group_count"),
|
||||
createMandatoryNumberCriterionOption("group_count"),
|
||||
createMandatoryNumberCriterionOption("marker_count"),
|
||||
ParentTagsCriterionOption,
|
||||
new MandatoryNumberCriterionOption("parent_tag_count", "parent_count"),
|
||||
|
||||
@@ -147,7 +147,7 @@ export type CriterionType =
|
||||
| "performers"
|
||||
| "studios"
|
||||
| "scenes"
|
||||
| "movies"
|
||||
| "groups"
|
||||
| "galleries"
|
||||
| "birth_year"
|
||||
| "age"
|
||||
@@ -174,7 +174,7 @@ export type CriterionType =
|
||||
| "gallery_count"
|
||||
| "performer_count"
|
||||
| "studio_count"
|
||||
| "movie_count"
|
||||
| "group_count"
|
||||
| "death_year"
|
||||
| "url"
|
||||
| "interactive"
|
||||
|
||||
Reference in New Issue
Block a user