stash/manager/paths/paths_scene_markers.go

25 lines
591 B
Go
Raw Normal View History

2019-02-09 12:30:49 +00:00
package paths
import (
"path/filepath"
"strconv"
)
type sceneMarkerPaths struct {
generated generatedPaths
}
func newSceneMarkerPaths(p Paths) *sceneMarkerPaths {
sp := sceneMarkerPaths{}
sp.generated = *p.Generated
return &sp
}
func (sp *sceneMarkerPaths) GetStreamPath(checksum string, seconds int) string {
return filepath.Join(sp.generated.Markers, checksum, strconv.Itoa(seconds) + ".mp4")
}
func (sp *sceneMarkerPaths) GetStreamPreviewImagePath(checksum string, seconds int) string {
return filepath.Join(sp.generated.Markers, checksum, strconv.Itoa(seconds) + ".webp")
}