mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Clip Preview Generation Fix (#3764)
This commit is contained in:
@@ -35,18 +35,12 @@ func (t *GenerateClipPreviewTask) Start(ctx context.Context) {
|
||||
}
|
||||
|
||||
encoder := image.NewThumbnailEncoder(GetInstance().FFMPEG, GetInstance().FFProbe, clipPreviewOptions)
|
||||
data, err := encoder.GetPreview(t.Image.Files.Primary(), models.DefaultGthumbWidth)
|
||||
err := encoder.GetPreview(filePath, prevPath, models.DefaultGthumbWidth)
|
||||
if err != nil {
|
||||
logger.Errorf("getting preview for image %s: %w", filePath, err)
|
||||
return
|
||||
}
|
||||
|
||||
err = fsutil.WriteFile(prevPath, data)
|
||||
if err != nil {
|
||||
logger.Errorf("writing preview for image %s: %w", filePath, err)
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (t *GenerateClipPreviewTask) required() bool {
|
||||
|
||||
Reference in New Issue
Block a user