Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
32c0d0ae66
commit
69f15924ab
|
@ -648,8 +648,8 @@ func (ind *Index) UserMediaFile(m *MediaFile, o IndexOptions, originalName, phot
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set video dimensions from primary file, if necessary.
|
// Sets the video dimensions from the primary image if it could not be determined from the video metadata.
|
||||||
// See also File.UpdateVideoInfos()
|
// If there is no primary image yet, File.UpdateVideoInfos() sets the fields in retrospect when there is one.
|
||||||
if file.FileWidth == 0 && primaryFile.FileWidth > 0 {
|
if file.FileWidth == 0 && primaryFile.FileWidth > 0 {
|
||||||
file.FileWidth = primaryFile.FileWidth
|
file.FileWidth = primaryFile.FileWidth
|
||||||
file.FileHeight = primaryFile.FileHeight
|
file.FileHeight = primaryFile.FileHeight
|
||||||
|
@ -657,8 +657,9 @@ func (ind *Index) UserMediaFile(m *MediaFile, o IndexOptions, originalName, phot
|
||||||
file.FilePortrait = primaryFile.FilePortrait
|
file.FilePortrait = primaryFile.FilePortrait
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set video appearance from primary file, if necessary.
|
// Set the appearance of the video from the primary file. In a future version, a still image extracted from the
|
||||||
// See also File.UpdateVideoInfos()
|
// video could be used for this purpose if the primary image is not directly derived from the video file,
|
||||||
|
// e.g. in live photo stacks, see https://github.com/photoprism/photoprism/pull/3588#issuecomment-1683429455
|
||||||
if primaryFile.FileDiff > 0 {
|
if primaryFile.FileDiff > 0 {
|
||||||
file.FileMainColor = primaryFile.FileMainColor
|
file.FileMainColor = primaryFile.FileMainColor
|
||||||
file.FileColors = primaryFile.FileColors
|
file.FileColors = primaryFile.FileColors
|
||||||
|
|
Loading…
Reference in a new issue