Rename Config.GetCachePath() to CachePath(), see #50
This commit is contained in:
parent
a3d9c61c42
commit
3462257cce
6 changed files with 11 additions and 11 deletions
|
@ -24,7 +24,7 @@ func configAction(ctx *cli.Context) error {
|
|||
fmt.Printf("originals-path %s\n", conf.OriginalsPath())
|
||||
fmt.Printf("import-path %s\n", conf.ImportPath())
|
||||
fmt.Printf("export-path %s\n", conf.ExportPath())
|
||||
fmt.Printf("cache-path %s\n", conf.GetCachePath())
|
||||
fmt.Printf("cache-path %s\n", conf.CachePath())
|
||||
fmt.Printf("assets-path %s\n", conf.GetAssetsPath())
|
||||
fmt.Printf("database-driver %s\n", conf.DatabaseDriver())
|
||||
fmt.Printf("database-dsn %s\n", conf.DatabaseDsn())
|
||||
|
|
|
@ -376,14 +376,14 @@ func (c *Config) DatabaseDsn() string {
|
|||
return c.databaseDsn
|
||||
}
|
||||
|
||||
// GetCachePath returns the path to the cache.
|
||||
func (c *Config) GetCachePath() string {
|
||||
// CachePath returns the path to the cache.
|
||||
func (c *Config) CachePath() string {
|
||||
return c.cachePath
|
||||
}
|
||||
|
||||
// GetThumbnailsPath returns the path to the cached thumbnails.
|
||||
func (c *Config) GetThumbnailsPath() string {
|
||||
return c.GetCachePath() + "/thumbnails"
|
||||
return c.CachePath() + "/thumbnails"
|
||||
}
|
||||
|
||||
// GetAssetsPath returns the path to the assets.
|
||||
|
|
|
@ -29,7 +29,7 @@ func TestConfig_SetValuesFromFile(t *testing.T) {
|
|||
c.SetValuesFromFile(fsutil.ExpandedFilename("../../configs/photoprism.yml"))
|
||||
|
||||
assert.Equal(t, "/srv/photoprism", c.GetAssetsPath())
|
||||
assert.Equal(t, "/srv/photoprism/cache", c.GetCachePath())
|
||||
assert.Equal(t, "/srv/photoprism/cache", c.CachePath())
|
||||
assert.Equal(t, "/srv/photoprism/cache/thumbnails", c.GetThumbnailsPath())
|
||||
assert.Equal(t, "/srv/photoprism/photos/originals", c.OriginalsPath())
|
||||
assert.Equal(t, "/srv/photoprism/photos/import", c.ImportPath())
|
||||
|
|
|
@ -35,9 +35,9 @@ type Config interface {
|
|||
OriginalsPath() string
|
||||
ImportPath() string
|
||||
ExportPath() string
|
||||
CachePath() string
|
||||
|
||||
DarktableCli() string
|
||||
GetCachePath() string
|
||||
GetThumbnailsPath() string
|
||||
GetAssetsPath() string
|
||||
GetTensorFlowModelPath() string
|
||||
|
|
|
@ -53,7 +53,7 @@ func TestContextConfig_SetValuesFromFile(t *testing.T) {
|
|||
c.SetValuesFromFile(fsutil.ExpandedFilename(test.ConfigFile))
|
||||
|
||||
assert.Equal(t, "/srv/photoprism", c.GetAssetsPath())
|
||||
assert.Equal(t, "/srv/photoprism/cache", c.GetCachePath())
|
||||
assert.Equal(t, "/srv/photoprism/cache", c.CachePath())
|
||||
assert.Equal(t, "/srv/photoprism/cache/thumbnails", c.GetThumbnailsPath())
|
||||
assert.Equal(t, "/srv/photoprism/photos/originals", c.OriginalsPath())
|
||||
assert.Equal(t, "/srv/photoprism/photos/import", c.ImportPath())
|
||||
|
|
|
@ -45,7 +45,7 @@ func (c *Config) RemoveTestData(t *testing.T) {
|
|||
os.RemoveAll(c.ImportPath())
|
||||
os.RemoveAll(c.ExportPath())
|
||||
os.RemoveAll(c.OriginalsPath())
|
||||
os.RemoveAll(c.GetCachePath())
|
||||
os.RemoveAll(c.CachePath())
|
||||
}
|
||||
|
||||
func (c *Config) DownloadTestData(t *testing.T) {
|
||||
|
@ -233,14 +233,14 @@ func (c *Config) DatabaseDsn() string {
|
|||
return DatabaseDsn
|
||||
}
|
||||
|
||||
// GetCachePath returns the path to the cache.
|
||||
func (c *Config) GetCachePath() string {
|
||||
// CachePath returns the path to the cache.
|
||||
func (c *Config) CachePath() string {
|
||||
return CachePath
|
||||
}
|
||||
|
||||
// GetThumbnailsPath returns the path to the cached thumbnails.
|
||||
func (c *Config) GetThumbnailsPath() string {
|
||||
return c.GetCachePath() + "/thumbnails"
|
||||
return c.CachePath() + "/thumbnails"
|
||||
}
|
||||
|
||||
// GetAssetsPath returns the path to the assets.
|
||||
|
|
Loading…
Reference in a new issue