mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Add option to generate image thumbnails during generate (#4602)
* Add option to generate image thumbnails * Limit number of concurrent image thumbnail generation ops
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"github.com/remeh/sizedwaitgroup"
|
||||
"github.com/stashapp/stash/internal/dlna"
|
||||
"github.com/stashapp/stash/internal/log"
|
||||
"github.com/stashapp/stash/internal/manager/config"
|
||||
@@ -33,6 +34,10 @@ type Manager struct {
|
||||
Config *config.Config
|
||||
Logger *log.Logger
|
||||
|
||||
// ImageThumbnailGenerateWaitGroup is the global wait group image thumbnail generation
|
||||
// It uses the parallel tasks setting from the configuration.
|
||||
ImageThumbnailGenerateWaitGroup sizedwaitgroup.SizedWaitGroup
|
||||
|
||||
Paths *paths.Paths
|
||||
|
||||
FFMpeg *ffmpeg.FFMpeg
|
||||
@@ -107,6 +112,8 @@ func (s *Manager) RefreshConfig() {
|
||||
if err := fsutil.EnsureDir(s.Paths.Generated.InteractiveHeatmap); err != nil {
|
||||
logger.Warnf("could not create interactive heatmaps directory: %v", err)
|
||||
}
|
||||
|
||||
s.ImageThumbnailGenerateWaitGroup.Size = cfg.GetParallelTasksWithAutoDetection()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user