From 1760f4fdcf5a074938bf01e6d89d20de601cdced Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Mon, 2 Dec 2019 03:19:44 +1100 Subject: [PATCH] Fix performers/studio/tags updating after parse (#229) --- ui/v2/src/components/scenes/SceneFilenameParser.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ui/v2/src/components/scenes/SceneFilenameParser.tsx b/ui/v2/src/components/scenes/SceneFilenameParser.tsx index 0a845e212..343bd477b 100644 --- a/ui/v2/src/components/scenes/SceneFilenameParser.tsx +++ b/ui/v2/src/components/scenes/SceneFilenameParser.tsx @@ -186,7 +186,7 @@ class SceneParserResult { // returns true if any of its fields have set == true public isChanged() { - return this.title.set || this.date.set; + return this.title.set || this.date.set || this.performerIds.set || this.studioId.set || this.tagIds.set; } public toSceneUpdateInput() { @@ -205,7 +205,9 @@ class SceneParserResult { SceneParserResult.setInput(ret, "title", this.title); SceneParserResult.setInput(ret, "date", this.date); - // TODO - other fields as added + SceneParserResult.setInput(ret, "performer_ids", this.performerIds); + SceneParserResult.setInput(ret, "studio_id", this.studioId); + SceneParserResult.setInput(ret, "tag_ids", this.tagIds); return ret; } @@ -274,9 +276,6 @@ const builtInRecipes = [ } ]; -// TODO: -// Add mappings for tags, performers, studio - export const SceneFilenameParser: FunctionComponent = (props: IProps) => { const [parserResult, setParserResult] = useState([]); const [parserInput, setParserInput] = useState(initialParserInput());