photoprism/internal/config/config_metadata.go
Michael Mayer 38722e72c8 Config: Use mutex when resolving the path of external binaries
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-10-12 18:39:30 +02:00

21 lines
651 B
Go

package config
// ExifBruteForce checks if a brute-force search should be performed when no Exif headers were found.
func (c *Config) ExifBruteForce() bool {
return c.options.ExifBruteForce || !c.ExifToolJson()
}
// ExifToolBin returns the exiftool executable file name.
func (c *Config) ExifToolBin() string {
return findBin(c.options.ExifToolBin, "exiftool")
}
// ExifToolJson checks if creating JSON metadata sidecar files with Exiftool is enabled.
func (c *Config) ExifToolJson() bool {
return !c.DisableExifTool()
}
// BackupYaml checks if creating YAML files is enabled.
func (c *Config) BackupYaml() bool {
return !c.DisableBackups()
}