Generate content for specific scenes (#672)

* Add UI dialog for scene(s)
* Move preview preset to config
This commit is contained in:
WithoutPants
2020-07-19 11:59:18 +10:00
committed by GitHub
parent 8e4945325d
commit c104c6d075
27 changed files with 552 additions and 148 deletions

View File

@@ -1,15 +1,17 @@
package manager
import (
"sync"
"github.com/stashapp/stash/pkg/logger"
"github.com/stashapp/stash/pkg/manager/paths"
"github.com/stashapp/stash/pkg/models"
"github.com/stashapp/stash/pkg/utils"
"sync"
)
type GenerateGthumbsTask struct {
Gallery models.Gallery
Gallery models.Gallery
Overwrite bool
}
func (t *GenerateGthumbsTask) Start(wg *sync.WaitGroup) {
@@ -19,7 +21,7 @@ func (t *GenerateGthumbsTask) Start(wg *sync.WaitGroup) {
for i := 0; i < count; i++ {
thumbPath := paths.GetGthumbPath(t.Gallery.Checksum, i, models.DefaultGthumbWidth)
exists, _ := utils.FileExists(thumbPath)
if exists {
if !t.Overwrite && exists {
continue
}
data := t.Gallery.GetThumbnail(i, models.DefaultGthumbWidth)