Fix generate preview overwrite behaviour (#3256)

This commit is contained in:
WithoutPants
2022-12-09 12:46:25 +11:00
committed by GitHub
parent a67eee8f4c
commit ce080c1b07
3 changed files with 42 additions and 24 deletions

View File

@@ -296,14 +296,13 @@ func (j *GenerateJob) queueSceneJobs(ctx context.Context, g *generate.Generator,
}
if task.required() {
sceneHash := scene.GetHash(task.fileNamingAlgorithm)
addTask := false
if j.overwrite || !task.doesVideoPreviewExist(sceneHash) {
if j.overwrite || !task.doesVideoPreviewExist() {
totals.previews++
addTask = true
}
if utils.IsTrue(j.input.ImagePreviews) && (j.overwrite || !task.doesImagePreviewExist(sceneHash)) {
if utils.IsTrue(j.input.ImagePreviews) && (j.overwrite || !task.doesImagePreviewExist()) {
totals.imagePreviews++
addTask = true
}