feat(api): add scene_filter parameter to findDuplicateScenes#6884
Open
slick-daddy wants to merge 9 commits intostashapp:developfrom
Open
feat(api): add scene_filter parameter to findDuplicateScenes#6884slick-daddy wants to merge 9 commits intostashapp:developfrom
slick-daddy wants to merge 9 commits intostashapp:developfrom
Conversation
Expands the findDuplicateScenes query to accept a full SceneFilterType. This enables filtering out specific directories or tags from the duplication matching process.
Modifies the FindDuplicates signature to take a SceneFilterType pointer, allowing the underlying repository to filter the pool of scenes before duplicate checking.
Updates the mock definition to match the new FindDuplicates method signature.
Modifies the FindDuplicateScenes GraphQL resolver to pass the newly added scene_filter schema argument into the database repository layer.
Refactors the FindDuplicates implementation to use the internal qb.makeQuery tool instead of static raw SQL. This enables the duplicate checker to utilize the provided SceneFilterType, natively supporting advanced filtering like path exclusions.
Updates the unit tests to pass a nil scene filter, matching the new FindDuplicates method signature.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #3573
Adds
scene_filterparameter support to thefindDuplicateScenesquery, allowing users to exclude specific scenes from duplicate checking results.For example, a user can now filter out scenes by path, tag, or any other supported scene filter criteria. This means scenes they intentionally want to keep (e.g. deepfakes, alternate versions) will no longer appear as unwanted noise in the duplicate checker.
Changes
scene_filterargument tofindDuplicateScenesSceneReaderWriterinterface and mock to accept aSceneFilterTypeFindDuplicatesquery is now dynamically built based on the provided filter