mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Fixed incorrect file paths on windows
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# Stash
|
||||
|
||||
[](https://travis-ci.org/stashapp/stash)
|
||||
|
||||
**Stash is a rails app which organizes and serves your porn.**
|
||||
|
||||
See a demo [here](https://vimeo.com/275537038) (password is stashapp).
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"github.com/stashapp/stash/logger"
|
||||
"github.com/stashapp/stash/utils"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
type PreviewGenerator struct {
|
||||
@@ -74,7 +74,7 @@ func (g *PreviewGenerator) generateConcatFile() error {
|
||||
}
|
||||
|
||||
func (g *PreviewGenerator) generateVideo(encoder *ffmpeg.Encoder) error {
|
||||
outputPath := path.Join(g.OutputDirectory, g.VideoFilename)
|
||||
outputPath := filepath.Join(g.OutputDirectory, g.VideoFilename)
|
||||
outputExists, _ := utils.FileExists(outputPath)
|
||||
if outputExists {
|
||||
return nil
|
||||
@@ -95,20 +95,20 @@ func (g *PreviewGenerator) generateVideo(encoder *ffmpeg.Encoder) error {
|
||||
encoder.ScenePreviewVideoChunk(g.Info.VideoFile, options)
|
||||
}
|
||||
|
||||
videoOutputPath := path.Join(g.OutputDirectory, g.VideoFilename)
|
||||
videoOutputPath := filepath.Join(g.OutputDirectory, g.VideoFilename)
|
||||
encoder.ScenePreviewVideoChunkCombine(g.Info.VideoFile, g.getConcatFilePath(), videoOutputPath)
|
||||
logger.Debug("created video preview: ", videoOutputPath)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (g *PreviewGenerator) generateImage(encoder *ffmpeg.Encoder) error {
|
||||
outputPath := path.Join(g.OutputDirectory, g.ImageFilename)
|
||||
outputPath := filepath.Join(g.OutputDirectory, g.ImageFilename)
|
||||
outputExists, _ := utils.FileExists(outputPath)
|
||||
if outputExists {
|
||||
return nil
|
||||
}
|
||||
|
||||
videoPreviewPath := path.Join(g.OutputDirectory, g.VideoFilename)
|
||||
videoPreviewPath := filepath.Join(g.OutputDirectory, g.VideoFilename)
|
||||
tmpOutputPath := instance.Paths.Generated.GetTmpPath(g.ImageFilename)
|
||||
if err := encoder.ScenePreviewVideoToImage(g.Info.VideoFile, 640, videoPreviewPath, tmpOutputPath); err != nil {
|
||||
return err
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/stashapp/stash/models"
|
||||
"github.com/stashapp/stash/utils"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"sync"
|
||||
)
|
||||
@@ -32,7 +32,7 @@ func (t *GenerateMarkersTask) Start(wg *sync.WaitGroup) {
|
||||
}
|
||||
|
||||
// Make the folder for the scenes markers
|
||||
markersFolder := path.Join(instance.Paths.Generated.Markers, t.Scene.Checksum)
|
||||
markersFolder := filepath.Join(instance.Paths.Generated.Markers, t.Scene.Checksum)
|
||||
_ = utils.EnsureDir(markersFolder)
|
||||
|
||||
encoder := ffmpeg.NewEncoder(instance.Paths.FixedPaths.FFMPEG)
|
||||
|
||||
Reference in New Issue
Block a user