mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
Update Metadata Bugfix (#3757)
This commit is contained in:
parent
94dda49352
commit
ed7640b7b1
1 changed files with 10 additions and 4 deletions
|
|
@ -69,10 +69,16 @@ func (d *Decorator) IsMissingMetadata(ctx context.Context, fs file.FS, f file.Fi
|
||||||
unsetNumber = -1
|
unsetNumber = -1
|
||||||
)
|
)
|
||||||
|
|
||||||
imf, ok := f.(*file.ImageFile)
|
imf, isImage := f.(*file.ImageFile)
|
||||||
if !ok {
|
vf, isVideo := f.(*file.VideoFile)
|
||||||
|
|
||||||
|
switch {
|
||||||
|
case isImage:
|
||||||
|
return imf.Format == unsetString || imf.Width == unsetNumber || imf.Height == unsetNumber
|
||||||
|
case isVideo:
|
||||||
|
videoFileDecorator := video.Decorator{FFProbe: d.FFProbe}
|
||||||
|
return videoFileDecorator.IsMissingMetadata(ctx, fs, vf)
|
||||||
|
default:
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
return imf.Format == unsetString || imf.Width == unsetNumber || imf.Height == unsetNumber
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue