Overwrite phash during generate if flag set (#1633)

This commit is contained in:
WithoutPants
2021-08-11 16:08:10 +10:00
committed by GitHub
parent 59c6fe046d
commit c29d8b547d
3 changed files with 4 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ import (
type GeneratePhashTask struct {
Scene models.Scene
Overwrite bool
fileNamingAlgorithm models.HashAlgorithm
txnManager models.TransactionManager
}
@@ -58,5 +59,5 @@ func (t *GeneratePhashTask) Start(wg *sizedwaitgroup.SizedWaitGroup) {
}
func (t *GeneratePhashTask) shouldGenerate() bool {
return !t.Scene.Phash.Valid
return t.Overwrite || !t.Scene.Phash.Valid
}