Convert: Show relative file name in error and log messages #2214
This commit is contained in:
parent
c74fcbf282
commit
161309e392
2 changed files with 7 additions and 9 deletions
|
@ -147,9 +147,7 @@ func (c *Convert) ToJson(f *MediaFile) (jsonName string, err error) {
|
|||
return jsonName, nil
|
||||
}
|
||||
|
||||
relName := f.RelName(c.conf.OriginalsPath())
|
||||
|
||||
log.Debugf("exiftool: extracting metadata from %s", relName)
|
||||
log.Debugf("exiftool: extracting metadata from %s", sanitize.Log(f.RootRelName()))
|
||||
|
||||
cmd := exec.Command(c.conf.ExifToolBin(), "-n", "-m", "-api", "LargeFileSupport", "-j", f.FileName())
|
||||
|
||||
|
@ -252,7 +250,7 @@ func (c *Convert) ToJpeg(f *MediaFile, force bool) (*MediaFile, error) {
|
|||
}
|
||||
|
||||
if !f.Exists() {
|
||||
return nil, fmt.Errorf("convert: %s not found", f.RelName(c.conf.OriginalsPath()))
|
||||
return nil, fmt.Errorf("convert: %s not found", f.RootRelName())
|
||||
}
|
||||
|
||||
if f.IsJpeg() {
|
||||
|
@ -279,7 +277,7 @@ func (c *Convert) ToJpeg(f *MediaFile, force bool) (*MediaFile, error) {
|
|||
}
|
||||
|
||||
if !c.conf.SidecarWritable() {
|
||||
return nil, fmt.Errorf("convert: disabled in read only mode (%s)", f.RelName(c.conf.OriginalsPath()))
|
||||
return nil, fmt.Errorf("convert: disabled in read only mode (%s)", f.RootRelName())
|
||||
}
|
||||
|
||||
fileName := f.RelName(c.conf.OriginalsPath())
|
||||
|
|
|
@ -178,7 +178,7 @@ func (c *Convert) ToAvc(f *MediaFile, encoderName string) (file *MediaFile, err
|
|||
}
|
||||
|
||||
if !f.Exists() {
|
||||
return nil, fmt.Errorf("convert: %s not found", f.RelName(c.conf.OriginalsPath()))
|
||||
return nil, fmt.Errorf("convert: %s not found", f.RootRelName())
|
||||
}
|
||||
|
||||
avcName := fs.FormatAvc.FindFirst(f.FileName(), []string{c.conf.SidecarPath(), fs.HiddenPath}, c.conf.OriginalsPath(), false)
|
||||
|
@ -190,15 +190,15 @@ func (c *Convert) ToAvc(f *MediaFile, encoderName string) (file *MediaFile, err
|
|||
}
|
||||
|
||||
if !c.conf.SidecarWritable() {
|
||||
return nil, fmt.Errorf("convert: transcoding disabled in read only mode (%s)", f.RelName(c.conf.OriginalsPath()))
|
||||
return nil, fmt.Errorf("convert: transcoding disabled in read only mode (%s)", f.RootRelName())
|
||||
}
|
||||
|
||||
if c.conf.DisableFFmpeg() {
|
||||
return nil, fmt.Errorf("convert: ffmpeg is disabled for transcoding %s", f.RelName(c.conf.OriginalsPath()))
|
||||
return nil, fmt.Errorf("convert: ffmpeg is disabled for transcoding %s", f.RootRelName())
|
||||
}
|
||||
|
||||
avcName = fs.FileName(f.FileName(), c.conf.SidecarPath(), c.conf.OriginalsPath(), fs.AvcExt)
|
||||
fileName := f.RelName(c.conf.OriginalsPath())
|
||||
avcName = fs.FileName(f.FileName(), c.conf.SidecarPath(), c.conf.OriginalsPath(), fs.AvcExt)
|
||||
|
||||
cmd, useMutex, err := c.AvcConvertCommand(f, avcName, encoderName)
|
||||
|
||||
|
|
Loading…
Reference in a new issue