2019-02-09 12:30:49 +00:00
|
|
|
package paths
|
|
|
|
|
|
|
|
import (
|
2019-03-23 14:56:59 +00:00
|
|
|
"github.com/stashapp/stash/pkg/manager/config"
|
2019-02-09 12:30:49 +00:00
|
|
|
"path/filepath"
|
|
|
|
)
|
|
|
|
|
2019-03-23 14:56:59 +00:00
|
|
|
type galleryPaths struct{}
|
2019-02-09 12:30:49 +00:00
|
|
|
|
2019-03-23 14:56:59 +00:00
|
|
|
func newGalleryPaths() *galleryPaths {
|
|
|
|
return &galleryPaths{}
|
2019-02-09 12:30:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (gp *galleryPaths) GetExtractedPath(checksum string) string {
|
2019-03-23 14:56:59 +00:00
|
|
|
return filepath.Join(config.GetCachePath(), checksum)
|
2019-02-09 12:30:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (gp *galleryPaths) GetExtractedFilePath(checksum string, fileName string) string {
|
2019-03-23 14:56:59 +00:00
|
|
|
return filepath.Join(config.GetCachePath(), checksum, fileName)
|
2019-02-09 12:30:49 +00:00
|
|
|
}
|