Fix video files with identical phashes being merged during scan (#5461)

* Change Fingerprints.Remove to return new instead of mutate current
* Match only by oshash and md5 when merging scenes during scan
This commit is contained in:
WithoutPants
2024-11-07 14:29:26 +11:00
committed by GitHub
parent 2a454e5a1e
commit 602f95dd29
3 changed files with 25 additions and 5 deletions

View File

@@ -1100,7 +1100,8 @@ func (s *scanJob) removeOutdatedFingerprints(existing models.File, fp models.Fin
// oshash has changed, MD5 is missing - remove MD5 from the existing fingerprints
logger.Infof("Removing outdated checksum from %s", existing.Base().Path)
existing.Base().Fingerprints.Remove(models.FingerprintTypeMD5)
b := existing.Base()
b.Fingerprints = b.Fingerprints.Remove(models.FingerprintTypeMD5)
}
// returns a file only if it was updated