mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
@@ -11,9 +11,9 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/bmatcuk/doublestar/v2"
|
||||
"github.com/disintegration/imaging"
|
||||
"github.com/fvbommel/sortorder"
|
||||
|
||||
"github.com/stashapp/stash/pkg/ffmpeg"
|
||||
"github.com/stashapp/stash/pkg/logger"
|
||||
"github.com/stashapp/stash/pkg/utils"
|
||||
@@ -89,8 +89,11 @@ func (g *SpriteGenerator) generateSpriteImage(encoder *ffmpeg.Encoder) error {
|
||||
}
|
||||
|
||||
// Combine all of the thumbnails into a sprite image
|
||||
globPath := filepath.Join(instance.Paths.Generated.Tmp, fmt.Sprintf("thumbnail_%s_*.jpg", g.VideoChecksum))
|
||||
imagePaths, _ := doublestar.Glob(globPath)
|
||||
pattern := fmt.Sprintf("thumbnail_%s_.+\\.jpg$", g.VideoChecksum)
|
||||
imagePaths, err := utils.MatchEntries(instance.Paths.Generated.Tmp, pattern)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sort.Sort(sortorder.Natural(imagePaths))
|
||||
var images []image.Image
|
||||
for _, imagePath := range imagePaths {
|
||||
|
||||
Reference in New Issue
Block a user