diff --git a/docker-compose.travis.yml b/docker-compose.travis.yml index b8e1ae382..9c2d54a3a 100644 --- a/docker-compose.travis.yml +++ b/docker-compose.travis.yml @@ -41,7 +41,8 @@ services: # PHOTOPRISM_THUMB_SIZE: 4096 # Retina 4K, DCI 4K (requires more storage); 7680 for 8K Ultra HD PHOTOPRISM_THUMB_SIZE_UNCACHED: 7680 # On-demand rendering size limit (default 7680, min 720, max 7680) PHOTOPRISM_JPEG_SIZE: 7680 # Size limit for converted image files in pixels (720-30000) - PHOTOPRISM_JPEG_QUALITY: 90 # Use 95 for high-quality thumbnails (requires more storage) + PHOTOPRISM_JPEG_QUALITY: 90 # Set to 95 for high-quality thumbnails (requires more storage) + PHOTOPRISM_DARKTABLE_PRESETS: "false" # Use darktable presets (disables concurrent raw to jpeg conversion) PHOTOPRISM_SIDECAR_JSON: "true" # Read metadata from JSON sidecar files created by exiftool PHOTOPRISM_SIDECAR_YAML: "true" # Backup photo metadata to YAML sidecar files CODECOV_TOKEN: diff --git a/docker-compose.yml b/docker-compose.yml index 52e111d1b..94de08819 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -55,7 +55,8 @@ services: # PHOTOPRISM_THUMB_SIZE: 4096 # Retina 4K, DCI 4K (requires more storage); 7680 for 8K Ultra HD PHOTOPRISM_THUMB_SIZE_UNCACHED: 7680 # On-demand rendering size limit (default 7680, min 720, max 7680) PHOTOPRISM_JPEG_SIZE: 7680 # Size limit for converted image files in pixels (720-30000) - PHOTOPRISM_JPEG_QUALITY: 90 # Use 95 for high-quality thumbnails (requires more storage) + PHOTOPRISM_JPEG_QUALITY: 90 # Set to 95 for high-quality thumbnails (requires more storage) + PHOTOPRISM_DARKTABLE_PRESETS: "false" # Use darktable presets (disables concurrent raw to jpeg conversion) PHOTOPRISM_SIDECAR_JSON: "true" # Read metadata from JSON sidecar files created by exiftool PHOTOPRISM_SIDECAR_YAML: "true" # Backup photo metadata to YAML sidecar files diff --git a/docker/photoprism/arm64/docker-compose.yml b/docker/photoprism/arm64/docker-compose.yml index 1c34e764b..0f783988d 100644 --- a/docker/photoprism/arm64/docker-compose.yml +++ b/docker/photoprism/arm64/docker-compose.yml @@ -45,7 +45,8 @@ services: # PHOTOPRISM_THUMB_SIZE: 4096 # Retina 4K, DCI 4K (requires more storage); 7680 for 8K Ultra HD PHOTOPRISM_THUMB_SIZE_UNCACHED: 7680 # On-demand rendering size limit (default 7680, min 720, max 7680) PHOTOPRISM_JPEG_SIZE: 7680 # Size limit for converted image files in pixels (720-30000) - PHOTOPRISM_JPEG_QUALITY: 90 # Use 95 for high-quality thumbnails (requires more storage) + PHOTOPRISM_JPEG_QUALITY: 90 # Set to 95 for high-quality thumbnails (requires more storage) + PHOTOPRISM_DARKTABLE_PRESETS: "false" # Use darktable presets (disables concurrent raw to jpeg conversion) PHOTOPRISM_STORAGE_PATH: "/photoprism/storage" # Storage PATH for generated files like cache and index volumes: - "~/Pictures/Originals:/photoprism/originals" # [local path]:[container path] diff --git a/docker/photoprism/docker-compose.yml b/docker/photoprism/docker-compose.yml index bdb7de8e6..0480003df 100644 --- a/docker/photoprism/docker-compose.yml +++ b/docker/photoprism/docker-compose.yml @@ -44,7 +44,8 @@ services: # PHOTOPRISM_THUMB_SIZE: 4096 # Retina 4K, DCI 4K (requires more storage); 7680 for 8K Ultra HD PHOTOPRISM_THUMB_SIZE_UNCACHED: 7680 # On-demand rendering size limit (default 7680, min 720, max 7680) PHOTOPRISM_JPEG_SIZE: 7680 # Size limit for converted image files in pixels (720-30000) - PHOTOPRISM_JPEG_QUALITY: 90 # Use 95 for high-quality thumbnails (requires more storage) + PHOTOPRISM_JPEG_QUALITY: 90 # Set to 95 for high-quality thumbnails (requires more storage) + PHOTOPRISM_DARKTABLE_PRESETS: "false" # Use darktable presets (disables concurrent raw to jpeg conversion) PHOTOPRISM_STORAGE_PATH: "/photoprism/storage" # Storage PATH for generated files like cache and index volumes: - "~/Pictures/Originals:/photoprism/originals" # [local path]:[container path] diff --git a/internal/commands/config.go b/internal/commands/config.go index daad0b7a5..f7d3c2f76 100644 --- a/internal/commands/config.go +++ b/internal/commands/config.go @@ -87,7 +87,7 @@ func configAction(ctx *cli.Context) error { // External binaries and sidecar configuration. fmt.Printf("%-25s %s\n", "darktable-bin", conf.DarktableBin()) - fmt.Printf("%-25s %t\n", "darktable-unlock", conf.DarktableUnlock()) + fmt.Printf("%-25s %t\n", "darktable-presets", conf.DarktablePresets()) fmt.Printf("%-25s %s\n", "sips-bin", conf.SipsBin()) fmt.Printf("%-25s %s\n", "heifconvert-bin", conf.HeifConvertBin()) fmt.Printf("%-25s %s\n", "ffmpeg-bin", conf.FFmpegBin()) diff --git a/internal/config/darktable.go b/internal/config/darktable.go index aff9dcb50..fe360fed8 100644 --- a/internal/config/darktable.go +++ b/internal/config/darktable.go @@ -5,7 +5,7 @@ func (c *Config) DarktableBin() string { return findExecutable(c.params.DarktableBin, "darktable-cli") } -// DarktableUnlock checks if presets should be disabled to run multiple instances concurrently. -func (c *Config) DarktableUnlock() bool { - return c.params.DarktableUnlock +// DarktablePresets checks if presets should be enabled (disables concurrent raw to jpeg conversion). +func (c *Config) DarktablePresets() bool { + return c.params.DarktablePresets } diff --git a/internal/config/darktable_test.go b/internal/config/darktable_test.go index 392f7f132..593fe8afe 100644 --- a/internal/config/darktable_test.go +++ b/internal/config/darktable_test.go @@ -5,10 +5,10 @@ import ( "testing" ) -func TestConfig_DarktableUnlock(t *testing.T) { +func TestConfig_DarktablePresets(t *testing.T) { c := NewConfig(CliTestContext()) - assert.False(t, c.DarktableUnlock()) + assert.False(t, c.DarktablePresets()) } func TestConfig_Darktablebin(t *testing.T) { diff --git a/internal/config/flags.go b/internal/config/flags.go index b33465781..1f370623e 100644 --- a/internal/config/flags.go +++ b/internal/config/flags.go @@ -191,9 +191,9 @@ var GlobalFlags = []cli.Flag{ EnvVar: "PHOTOPRISM_DARKTABLE_BIN", }, cli.BoolFlag{ - Name: "darktable-unlock", - Usage: "disable presets to run multiple instances concurrently", - EnvVar: "PHOTOPRISM_DARKTABLE_UNLOCK", + Name: "darktable-presets", + Usage: "use darktable presets (disables concurrent raw to jpeg conversion)", + EnvVar: "PHOTOPRISM_DARKTABLE_PRESETS", }, cli.StringFlag{ Name: "sips-bin", diff --git a/internal/config/params.go b/internal/config/params.go index cdbfe4b3a..8f7514c8f 100644 --- a/internal/config/params.go +++ b/internal/config/params.go @@ -66,7 +66,7 @@ type Params struct { HttpServerPassword string `yaml:"http-password" flag:"http-password"` SipsBin string `yaml:"sips-bin" flag:"sips-bin"` DarktableBin string `yaml:"darktable-bin" flag:"darktable-bin"` - DarktableUnlock bool `yaml:"darktable-unlock" flag:"darktable-unlock"` + DarktablePresets bool `yaml:"darktable-presets" flag:"darktable-presets"` HeifConvertBin string `yaml:"heifconvert-bin" flag:"heifconvert-bin"` FFmpegBin string `yaml:"ffmpeg-bin" flag:"ffmpeg-bin"` ExifToolBin string `yaml:"exiftool-bin" flag:"exiftool-bin"` diff --git a/internal/photoprism/convert.go b/internal/photoprism/convert.go index 890007cda..53e8af87e 100644 --- a/internal/photoprism/convert.go +++ b/internal/photoprism/convert.go @@ -173,12 +173,12 @@ func (c *Convert) JpegConvertCommand(mf *MediaFile, jpegName string, xmpName str var args []string // Only one instance of darktable-cli allowed due to locking if presets are loaded. - if c.conf.DarktableUnlock() { - useMutex = false - args = []string{"--apply-custom-presets", "false", "--width", size, "--height", size, mf.FileName()} - } else { + if c.conf.DarktablePresets() { useMutex = true args = []string{"--width", size, "--height", size, mf.FileName()} + } else { + useMutex = false + args = []string{"--apply-custom-presets", "false", "--width", size, "--height", size, mf.FileName()} } if xmpName != "" {