From 7b3b2ae9ba3a68fede2ac6b3cbff21c91cfff7c7 Mon Sep 17 00:00:00 2001 From: kermieisinthehouse Date: Tue, 17 Aug 2021 20:11:57 -0700 Subject: [PATCH] Order sceneDuplicateChecker results by size (#1639) --- pkg/sqlite/scene.go | 4 +++- ui/v2.5/src/components/Changelog/versions/v090.md | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/sqlite/scene.go b/pkg/sqlite/scene.go index fbbaaeb3c..cd56e9db2 100644 --- a/pkg/sqlite/scene.go +++ b/pkg/sqlite/scene.go @@ -68,13 +68,15 @@ SELECT GROUP_CONCAT(id) as ids FROM scenes WHERE phash IS NOT NULL GROUP BY phash -HAVING COUNT(*) > 1; +HAVING COUNT(phash) > 1 +ORDER BY SUM(size) DESC; ` var findAllPhashesQuery = ` SELECT id, phash FROM scenes WHERE phash IS NOT NULL +ORDER BY size DESC ` type sceneQueryBuilder struct { diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 22cb7935e..abbe3fe64 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -9,6 +9,7 @@ * Added not equals/greater than/less than modifiers for resolution criteria. ([#1568](https://github.com/stashapp/stash/pull/1568)) ### 🎨 Improvements +* Show largest duplicates first in scene duplicate checker. ([#1639](https://github.com/stashapp/stash/pull/1639)) * Added checkboxes to scene list view. ([#1642](https://github.com/stashapp/stash/pull/1642)) * Added keyboard shortcuts for scene queue navigation. ([#1635](https://github.com/stashapp/stash/pull/1635)) * Made performer scrape menu scrollable. ([#1634](https://github.com/stashapp/stash/pull/1634))