2019-02-09 12:30:49 +00:00
|
|
|
package paths
|
|
|
|
|
|
|
|
import (
|
|
|
|
"path/filepath"
|
|
|
|
"strconv"
|
|
|
|
)
|
|
|
|
|
|
|
|
type sceneMarkerPaths struct {
|
2022-04-18 00:50:10 +00:00
|
|
|
generatedPaths
|
2019-02-09 12:30:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func newSceneMarkerPaths(p Paths) *sceneMarkerPaths {
|
2022-04-18 00:50:10 +00:00
|
|
|
sp := sceneMarkerPaths{
|
|
|
|
generatedPaths: *p.Generated,
|
|
|
|
}
|
2019-02-09 12:30:49 +00:00
|
|
|
return &sp
|
|
|
|
}
|
|
|
|
|
2022-04-18 00:50:10 +00:00
|
|
|
func (sp *sceneMarkerPaths) GetVideoPreviewPath(checksum string, seconds int) string {
|
|
|
|
return filepath.Join(sp.Markers, checksum, strconv.Itoa(seconds)+".mp4")
|
2019-02-09 12:30:49 +00:00
|
|
|
}
|
|
|
|
|
2022-04-18 00:50:10 +00:00
|
|
|
func (sp *sceneMarkerPaths) GetWebpPreviewPath(checksum string, seconds int) string {
|
|
|
|
return filepath.Join(sp.Markers, checksum, strconv.Itoa(seconds)+".webp")
|
2019-02-09 12:30:49 +00:00
|
|
|
}
|
2021-09-15 02:27:05 +00:00
|
|
|
|
2022-04-18 00:50:10 +00:00
|
|
|
func (sp *sceneMarkerPaths) GetScreenshotPath(checksum string, seconds int) string {
|
|
|
|
return filepath.Join(sp.Markers, checksum, strconv.Itoa(seconds)+".jpg")
|
2021-09-15 02:27:05 +00:00
|
|
|
}
|