mirror of
https://github.com/stashapp/stash.git
synced 2025-12-12 03:12:24 +01:00
Clear scene tagger results on new search (#1526)
* Clear search results when searching in tagger * Fix oshash messageID
This commit is contained in:
parent
4e26633abb
commit
4e08e37d74
2 changed files with 11 additions and 1 deletions
|
|
@ -195,7 +195,17 @@ const TaggerList: React.FC<ITaggerListProps> = ({
|
|||
inputForm?.current?.reset();
|
||||
}, [config.mode, config.blacklist]);
|
||||
|
||||
function clearSceneSearchResult(sceneID: string) {
|
||||
// remove sceneID results from the results object
|
||||
const { [sceneID]: _removedResult, ...newSearchResults } = searchResults;
|
||||
const { [sceneID]: _removedError, ...newSearchErrors } = searchErrors;
|
||||
setSearchResults(newSearchResults);
|
||||
setSearchErrors(newSearchErrors);
|
||||
}
|
||||
|
||||
const doBoxSearch = (sceneID: string, searchVal: string) => {
|
||||
clearSceneSearchResult(sceneID);
|
||||
|
||||
stashBoxSceneQuery(searchVal, selectedEndpoint.index)
|
||||
.then((queryData) => {
|
||||
const s = selectScenes(queryData.data?.queryStashBoxScene);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ export function makeCriteria(type: CriterionType = "none") {
|
|||
case "checksum":
|
||||
case "oshash":
|
||||
return new StringCriterion(
|
||||
new MandatoryStringCriterionOption(type, type)
|
||||
new MandatoryStringCriterionOption("media_info.hash", type, type)
|
||||
);
|
||||
case "rating":
|
||||
return new NumberCriterion(RatingCriterionOption);
|
||||
|
|
|
|||
Loading…
Reference in a new issue