Order sceneDuplicateChecker results by size (#1639)

This commit is contained in:
kermieisinthehouse
2021-08-17 20:11:57 -07:00
committed by GitHub
parent 9803684535
commit 7b3b2ae9ba
2 changed files with 4 additions and 1 deletions

View File

@@ -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 {