From d32e375521c15e7d1bd9e1b948d996b1f480a243 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Thu, 30 Jun 2022 09:25:13 +1000 Subject: [PATCH] Treat edited values as scraped (#2702) * Treat edited values as scraped * Fix scrape selection on change --- ui/v2.5/src/components/Changelog/versions/v0160.md | 1 + ui/v2.5/src/components/Shared/ScrapeDialog.tsx | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/v2.5/src/components/Changelog/versions/v0160.md b/ui/v2.5/src/components/Changelog/versions/v0160.md index 2bfd2957f..e65dd05e9 100644 --- a/ui/v2.5/src/components/Changelog/versions/v0160.md +++ b/ui/v2.5/src/components/Changelog/versions/v0160.md @@ -7,6 +7,7 @@ * Moved Filter and Saved Filters buttons out of the query input field. ([#2668](https://github.com/stashapp/stash/pull/2668)) ### 🐛 Bug fixes +* Fix fields disappearing after creating missing objects in the scrape dialog. ([#2702](https://github.com/stashapp/stash/pull/2702)) * Fix saved filters with uppercase characters not appearing in filtered results. ([#2698](https://github.com/stashapp/stash/pull/2698)) * Fix query results not updating when clearing search query field. ([#2686](https://github.com/stashapp/stash/pull/2686)) * Fix incorrect field name in movie export json. ([#2664](https://github.com/stashapp/stash/pull/2664)) diff --git a/ui/v2.5/src/components/Shared/ScrapeDialog.tsx b/ui/v2.5/src/components/Shared/ScrapeDialog.tsx index 0fb9c8ef5..a81f86981 100644 --- a/ui/v2.5/src/components/Shared/ScrapeDialog.tsx +++ b/ui/v2.5/src/components/Shared/ScrapeDialog.tsx @@ -45,8 +45,11 @@ export class ScrapeResult { const ret = clone(this); ret.newValue = value; - ret.useNewValue = isEqual(ret.newValue, ret.originalValue); - ret.scraped = ret.useNewValue; + ret.useNewValue = !isEqual(ret.newValue, ret.originalValue); + + // #2691 - if we're setting the value, assume it should be treated as + // scraped + ret.scraped = true; return ret; }