stash/manager/paths/paths_gallery.go

25 lines
528 B
Go
Raw Normal View History

2019-02-09 12:30:49 +00:00
package paths
import (
2019-02-10 02:53:08 +00:00
"github.com/stashapp/stash/manager/jsonschema"
2019-02-09 12:30:49 +00:00
"path/filepath"
)
type galleryPaths struct {
config *jsonschema.Config
}
func newGalleryPaths(c *jsonschema.Config) *galleryPaths {
gp := galleryPaths{}
gp.config = c
return &gp
}
func (gp *galleryPaths) GetExtractedPath(checksum string) string {
return filepath.Join(gp.config.Cache, checksum)
}
func (gp *galleryPaths) GetExtractedFilePath(checksum string, fileName string) string {
return filepath.Join(gp.config.Cache, checksum, fileName)
}