mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Fix creating performer from gallery scrape dialog (#1320)
This commit is contained in:
@@ -16,10 +16,10 @@ import {
|
||||
usePerformerCreate,
|
||||
useMovieCreate,
|
||||
useTagCreate,
|
||||
stringToGender,
|
||||
makePerformerCreateInput,
|
||||
} from "src/core/StashService";
|
||||
import { useToast } from "src/hooks";
|
||||
import { DurationUtils, filterData } from "src/utils";
|
||||
import { DurationUtils } from "src/utils";
|
||||
|
||||
function renderScrapedStudio(
|
||||
result: ScrapeResult<string>,
|
||||
@@ -361,33 +361,7 @@ export const SceneScrapeDialog: React.FC<ISceneScrapeDialogProps> = (
|
||||
}
|
||||
|
||||
async function createNewPerformer(toCreate: GQL.ScrapedScenePerformer) {
|
||||
const input: GQL.PerformerCreateInput = {
|
||||
name: toCreate.name,
|
||||
url: toCreate.url,
|
||||
gender: stringToGender(toCreate.gender),
|
||||
birthdate: toCreate.birthdate,
|
||||
ethnicity: toCreate.ethnicity,
|
||||
country: toCreate.country,
|
||||
eye_color: toCreate.eye_color,
|
||||
height: toCreate.height,
|
||||
measurements: toCreate.measurements,
|
||||
fake_tits: toCreate.fake_tits,
|
||||
career_length: toCreate.career_length,
|
||||
tattoos: toCreate.tattoos,
|
||||
piercings: toCreate.piercings,
|
||||
aliases: toCreate.aliases,
|
||||
twitter: toCreate.twitter,
|
||||
instagram: toCreate.instagram,
|
||||
tag_ids: filterData((toCreate.tags ?? []).map((t) => t.stored_id)),
|
||||
image:
|
||||
(toCreate.images ?? []).length > 0
|
||||
? (toCreate.images ?? [])[0]
|
||||
: undefined,
|
||||
details: toCreate.details,
|
||||
death_date: toCreate.death_date,
|
||||
hair_color: toCreate.hair_color,
|
||||
weight: toCreate.weight ? Number(toCreate.weight) : undefined,
|
||||
};
|
||||
const input = makePerformerCreateInput(toCreate);
|
||||
|
||||
try {
|
||||
const result = await createPerformer({
|
||||
|
||||
Reference in New Issue
Block a user