Add various filter criteria (#1505)

* Add various filter criteria
* Add tag name criterion
This commit is contained in:
WithoutPants
2021-06-23 09:10:20 +10:00
committed by GitHub
parent 5ecea3f69f
commit 4165e7779f
20 changed files with 189 additions and 7 deletions

View File

@@ -55,3 +55,12 @@ func findNeighbors(bucket int, neighbors []int, hashes []*Phash, scenes *[]int)
func PhashToString(phash int64) string {
return strconv.FormatUint(uint64(phash), 16)
}
func StringToPhash(s string) (int64, error) {
ret, err := strconv.ParseUint(s, 16, 64)
if err != nil {
return 0, err
}
return int64(ret), nil
}