RAW: Skip Darktable when converting Canon CR3 and Fuji RAF files #1362
This commit is contained in:
parent
63094e7b17
commit
07c711a0b4
2 changed files with 11 additions and 4 deletions
|
@ -176,12 +176,17 @@ func (c *Convert) ToJson(f *MediaFile) (jsonName string, err error) {
|
|||
|
||||
// JpegConvertCommand returns the command for converting files to JPEG, depending on the format.
|
||||
func (c *Convert) JpegConvertCommand(f *MediaFile, jpegName string, xmpName string) (result *exec.Cmd, useMutex bool, err error) {
|
||||
if f == nil {
|
||||
return result, useMutex, fmt.Errorf("convert: file is nil - you might have found a bug")
|
||||
}
|
||||
|
||||
size := strconv.Itoa(c.conf.JpegSize())
|
||||
fileExt := f.Extension()
|
||||
|
||||
if f.IsRaw() {
|
||||
if c.conf.SipsEnabled() {
|
||||
result = exec.Command(c.conf.SipsBin(), "-Z", size, "-s", "format", "jpeg", "--out", jpegName, f.FileName())
|
||||
} else if c.conf.DarktableEnabled() && f.Extension() != ".cr3" {
|
||||
} else if c.conf.DarktableEnabled() && fileExt != fs.CanonCr3Ext && fileExt != fs.FujiRawExt {
|
||||
var args []string
|
||||
|
||||
// Only one instance of darktable-cli allowed due to locking if presets are loaded.
|
||||
|
|
|
@ -49,9 +49,11 @@ type FileExtensions map[string]FileFormat
|
|||
type TypeExtensions map[FileFormat][]string
|
||||
|
||||
const (
|
||||
YamlExt = ".yml"
|
||||
JpegExt = ".jpg"
|
||||
AvcExt = ".avc"
|
||||
YamlExt = ".yml"
|
||||
JpegExt = ".jpg"
|
||||
AvcExt = ".avc"
|
||||
FujiRawExt = ".raf"
|
||||
CanonCr3Ext = ".cr3"
|
||||
)
|
||||
|
||||
// FileExt contains the filename extensions of file formats known to PhotoPrism.
|
||||
|
|
Loading…
Reference in a new issue