aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-12-26 06:41:41 +0100
committerPřemysl Eric Janouch <p@janouch.name>2023-12-26 06:41:41 +0100
commit6345d9e18e126b85c7e3f59e1b390084320bec8c (patch)
tree22e2041a7eb963f50d67868f013702308fe0af50
parent74a6dd0233bd0c983e191b9708e0ed257e78b0ff (diff)
downloadgallery-6345d9e18e126b85c7e3f59e1b390084320bec8c.tar.gz
gallery-6345d9e18e126b85c7e3f59e1b390084320bec8c.tar.xz
gallery-6345d9e18e126b85c7e3f59e1b390084320bec8c.zip
More meaningful dhash command
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index 67c0850..7651525 100644
--- a/main.go
+++ b/main.go
@@ -2228,8 +2228,8 @@ func cmdDhash(fs *flag.FlagSet, args []string) error {
hexSHA1 := args[1:]
if len(hexSHA1) == 0 {
var err error
- hexSHA1, err = dbCollectStrings(`
- SELECT sha1 FROM image WHERE dhash IS NULL`)
+ hexSHA1, err = dbCollectStrings(`SELECT sha1 FROM image
+ WHERE thumbw IS NOT NULL AND thumbh IS NOT NULL AND dhash IS NULL`)
if err != nil {
return err
}