Select first tagger result if resolved (#2051)

This commit is contained in:
WithoutPants
2021-11-23 08:21:53 +11:00
committed by GitHub
parent c98ad7a62c
commit 9e558d92f2
2 changed files with 4 additions and 1 deletions

View File

@@ -6,6 +6,7 @@
* Added plugin hook for Tag merge operation. ([#2010](https://github.com/stashapp/stash/pull/2010)) * Added plugin hook for Tag merge operation. ([#2010](https://github.com/stashapp/stash/pull/2010))
### 🐛 Bug fixes ### 🐛 Bug fixes
* Select first scene result in scene tagger where possible. ([#2051](https://github.com/stashapp/stash/pull/2051))
* Reject dates with invalid format. ([#2052](https://github.com/stashapp/stash/pull/2052)) * Reject dates with invalid format. ([#2052](https://github.com/stashapp/stash/pull/2052))
* Fix Autostart Video on Play Selected and Continue Playlist default settings not working. ([#2050](https://github.com/stashapp/stash/pull/2050)) * Fix Autostart Video on Play Selected and Continue Playlist default settings not working. ([#2050](https://github.com/stashapp/stash/pull/2050))
* Fix "Custom Performer Images" feature picking up non-image files. ([#2017](https://github.com/stashapp/stash/pull/2017)) * Fix "Custom Performer Images" feature picking up non-image files. ([#2017](https://github.com/stashapp/stash/pull/2017))

View File

@@ -655,7 +655,7 @@ const StashSearchResult: React.FC<IStashSearchResultProps> = ({
export interface ISceneSearchResults { export interface ISceneSearchResults {
target: GQL.SlimSceneDataFragment; target: GQL.SlimSceneDataFragment;
scenes: GQL.ScrapedSceneDataFragment[]; scenes: IScrapedScene[];
} }
export const SceneSearchResults: React.FC<ISceneSearchResults> = ({ export const SceneSearchResults: React.FC<ISceneSearchResults> = ({
@@ -667,6 +667,8 @@ export const SceneSearchResults: React.FC<ISceneSearchResults> = ({
useEffect(() => { useEffect(() => {
if (!scenes) { if (!scenes) {
setSelectedResult(undefined); setSelectedResult(undefined);
} else if (scenes.length > 0 && scenes[0].resolved) {
setSelectedResult(0);
} }
}, [scenes]); }, [scenes]);