4 Commits

Author SHA1 Message Date
7c95ec57d7 Ignore tmp 2024-10-04 14:33:20 +02:00
c72fbdd086 Improve display for progress 2024-10-04 14:32:59 +02:00
ce574a0b4a Ignore test_data 2024-10-04 14:32:45 +02:00
ceab693f34 Fix condition for adding a cluster 2023-12-10 21:51:02 +01:00
3 changed files with 5 additions and 3 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
*.exe
test_data/
tmp/

View File

@ -35,7 +35,7 @@ func (fm *FilesMap) getImageClusters() []imageCluster {
currentCluster = append(currentCluster, similarImage{path: otherFile.path, distance: distance})
}
if len(currentCluster) > 1 {
if len(currentCluster) <= 1 {
continue
}

View File

@ -43,7 +43,7 @@ func newFilesMap() *FilesMap {
func (fm *FilesMap) FileHashingWorker(wg *sync.WaitGroup) {
for file := range fm.FilesHashing {
if *verbose {
fmt.Println("Hashing file", file.path)
fmt.Fprintf(fm.progress, "Hashing file %s\n", file.path)
}
hash, err := calculateFileHash(file.path)
@ -63,7 +63,7 @@ func (fm *FilesMap) FileHashingWorker(wg *sync.WaitGroup) {
func (fm *FilesMap) ImageHashingWorker(wg *sync.WaitGroup) {
for file := range fm.ImagesHashing {
if *verbose {
fmt.Println("Hashing image", file.path)
fmt.Fprintf(fm.progress, "Hashing image %s\n", file.path)
}
hash, err := calculateImageHash(file.path)