Skip to content

Commit 3515594

Browse files
committed
fix(search): keep the video facet on the file itself
1 parent a8318fe commit 3515594

2 files changed

Lines changed: 7 additions & 39 deletions

File tree

protogen/gen/opencloud/messages/search/v0/search.pb.web.go

Lines changed: 0 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

services/search/pkg/content/tika.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,13 @@ func (t Tika) Extract(ctx context.Context, ri *provider.ResourceInfo) (Document,
113113
if v := t.getAudio(meta); v != nil {
114114
doc.Audio = v
115115
}
116-
if v := t.getVideo(meta); v != nil {
117-
doc.Video = v
118-
}
116+
}
117+
118+
if len(metas) > 0 {
119+
// the video facet says the file is a video, so it comes from the file
120+
// itself: the clip tika extracts from a motion photo must not make its
121+
// image look like one
122+
doc.Video = t.getVideo(metas[0])
119123
}
120124

121125
// a motion photo is the xmp on the file itself plus the video tika extracted

0 commit comments

Comments
 (0)