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 {
|
2019-02-14 22:53:32 +00:00
|
|
|
return filepath.Join(sp.generated.Markers, checksum, strconv.Itoa(seconds)+".mp4")
|
2019-02-09 12:30:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (sp *sceneMarkerPaths) GetStreamPreviewImagePath(checksum string, seconds int) string {
|
2019-02-14 22:53:32 +00:00
|
|
|
return filepath.Join(sp.generated.Markers, checksum, strconv.Itoa(seconds)+".webp")
|
2019-02-09 12:30:49 +00:00
|
|
|
}
|