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:
@@ -22,7 +22,7 @@ func (t *GenerateInteractiveHeatmapSpeedTask) GetDescription() string {
|
||||
}
|
||||
|
||||
func (t *GenerateInteractiveHeatmapSpeedTask) Start(ctx context.Context) {
|
||||
if !t.shouldGenerate() {
|
||||
if !t.required() {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -52,13 +52,18 @@ func (t *GenerateInteractiveHeatmapSpeedTask) Start(ctx context.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
func (t *GenerateInteractiveHeatmapSpeedTask) shouldGenerate() bool {
|
||||
func (t *GenerateInteractiveHeatmapSpeedTask) required() bool {
|
||||
primaryFile := t.Scene.Files.Primary()
|
||||
if primaryFile == nil || !primaryFile.Interactive {
|
||||
return false
|
||||
}
|
||||
|
||||
if t.Overwrite {
|
||||
return true
|
||||
}
|
||||
|
||||
sceneHash := t.Scene.GetHash(t.fileNamingAlgorithm)
|
||||
return !t.doesHeatmapExist(sceneHash) || primaryFile.InteractiveSpeed == nil || t.Overwrite
|
||||
return !t.doesHeatmapExist(sceneHash) || primaryFile.InteractiveSpeed == nil
|
||||
}
|
||||
|
||||
func (t *GenerateInteractiveHeatmapSpeedTask) doesHeatmapExist(sceneChecksum string) bool {
|
||||
|
||||
Reference in New Issue
Block a user