mirror of
https://github.com/stashapp/stash.git
synced 2025-12-07 00:43:12 +01:00
* 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
34 lines
655 B
Go
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")
|
|
}
|