mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Fix incorrect performer removed after creation (#3251)
This commit is contained in:
@@ -470,7 +470,11 @@ export const SceneScrapeDialog: React.FC<ISceneScrapeDialogProps> = ({
|
|||||||
|
|
||||||
// remove the performer from the list
|
// remove the performer from the list
|
||||||
const newPerformersClone = newPerformers.concat();
|
const newPerformersClone = newPerformers.concat();
|
||||||
const pIndex = newPerformersClone.indexOf(toCreate);
|
const pIndex = newPerformersClone.findIndex(
|
||||||
|
(p) => p.name === toCreate.name
|
||||||
|
);
|
||||||
|
if (pIndex === -1) throw new Error("Could not find performer to remove");
|
||||||
|
|
||||||
newPerformersClone.splice(pIndex, 1);
|
newPerformersClone.splice(pIndex, 1);
|
||||||
|
|
||||||
setNewPerformers(newPerformersClone);
|
setNewPerformers(newPerformersClone);
|
||||||
@@ -520,6 +524,7 @@ export const SceneScrapeDialog: React.FC<ISceneScrapeDialogProps> = ({
|
|||||||
// remove the movie from the list
|
// remove the movie from the list
|
||||||
const newMoviesClone = newMovies.concat();
|
const newMoviesClone = newMovies.concat();
|
||||||
const pIndex = newMoviesClone.indexOf(toCreate);
|
const pIndex = newMoviesClone.indexOf(toCreate);
|
||||||
|
if (pIndex === -1) throw new Error("Could not find movie to remove");
|
||||||
newMoviesClone.splice(pIndex, 1);
|
newMoviesClone.splice(pIndex, 1);
|
||||||
|
|
||||||
setNewMovies(newMoviesClone);
|
setNewMovies(newMoviesClone);
|
||||||
@@ -555,6 +560,7 @@ export const SceneScrapeDialog: React.FC<ISceneScrapeDialogProps> = ({
|
|||||||
// remove the tag from the list
|
// remove the tag from the list
|
||||||
const newTagsClone = newTags.concat();
|
const newTagsClone = newTags.concat();
|
||||||
const pIndex = newTagsClone.indexOf(toCreate);
|
const pIndex = newTagsClone.indexOf(toCreate);
|
||||||
|
if (pIndex === -1) throw new Error("Could not find performer to remove");
|
||||||
newTagsClone.splice(pIndex, 1);
|
newTagsClone.splice(pIndex, 1);
|
||||||
|
|
||||||
setNewTags(newTagsClone);
|
setNewTags(newTagsClone);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
* Changed performer aliases to be a list, rather than a string field. ([#3113](https://github.com/stashapp/stash/pull/3113))
|
* Changed performer aliases to be a list, rather than a string field. ([#3113](https://github.com/stashapp/stash/pull/3113))
|
||||||
|
|
||||||
### 🐛 Bug fixes
|
### 🐛 Bug fixes
|
||||||
|
* Fixed incorrect new Performer pill being removed when creating Performer from scrape dialog. ([#3251](https://github.com/stashapp/stash/pull/3251))
|
||||||
* Fixed date fields not being nulled correctly when cleared. ([#3243](https://github.com/stashapp/stash/pull/3243))
|
* Fixed date fields not being nulled correctly when cleared. ([#3243](https://github.com/stashapp/stash/pull/3243))
|
||||||
* Fixed scene wall items to show file base name where scene has no title set. ([#3242](https://github.com/stashapp/stash/pull/3242))
|
* Fixed scene wall items to show file base name where scene has no title set. ([#3242](https://github.com/stashapp/stash/pull/3242))
|
||||||
* Fixed image exclusion pattern being applied to all files. ([#3241](https://github.com/stashapp/stash/pull/3241))
|
* Fixed image exclusion pattern being applied to all files. ([#3241](https://github.com/stashapp/stash/pull/3241))
|
||||||
|
|||||||
Reference in New Issue
Block a user