mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Fix generate task override behaviour (#3661)
This commit is contained in:
@@ -24,7 +24,7 @@ func (t *GeneratePhashTask) GetDescription() string {
|
||||
}
|
||||
|
||||
func (t *GeneratePhashTask) Start(ctx context.Context) {
|
||||
if !t.shouldGenerate() {
|
||||
if !t.required() {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -49,6 +49,10 @@ func (t *GeneratePhashTask) Start(ctx context.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
func (t *GeneratePhashTask) shouldGenerate() bool {
|
||||
return t.Overwrite || t.File.Fingerprints.Get(file.FingerprintTypePhash) == nil
|
||||
func (t *GeneratePhashTask) required() bool {
|
||||
if t.Overwrite {
|
||||
return true
|
||||
}
|
||||
|
||||
return t.File.Fingerprints.Get(file.FingerprintTypePhash) == nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user