stash/pkg/models/paths/paths.go
WithoutPants 7cff71c35f
Add filesystem based blob storage (#3187)
* Refactor transaction hooks. Add preCommit
* Add BlobStore
* Use blobStore for tag images
* Use blobStore for studio images
* Use blobStore for performer images
* Use blobStore for scene covers
* Don't generate screenshots in legacy directory
* Run post-hooks outside original transaction
* Use blobStore for movie images
* Remove unnecessary DestroyImage methods
* Add missing filter for scene cover
* Add covers to generate options
* Add generate cover option to UI
* Add screenshot migration
* Delete thumb files as part of screenshot migration
2023-03-17 10:52:49 +11:00

34 lines
655 B
Go

package paths
import (
"path/filepath"
"github.com/stashapp/stash/pkg/fsutil"
)
type Paths struct {
Generated *generatedPaths
Scene *scenePaths
SceneMarkers *sceneMarkerPaths
Blobs string
}
func NewPaths(generatedPath string, blobsPath string) Paths {
p := Paths{}
p.Generated = newGeneratedPaths(generatedPath)
p.Scene = newScenePaths(p)
p.SceneMarkers = newSceneMarkerPaths(p)
p.Blobs = blobsPath
return p
}
func GetStashHomeDirectory() string {
return filepath.Join(fsutil.GetHomeDirectory(), ".stash")
}
func GetDefaultDatabaseFilePath() string {
return filepath.Join(GetStashHomeDirectory(), "stash-go.sqlite")
}