Skip to content

feat(search): live photo facet - #3202

Draft
dschmidt wants to merge 1 commit into
feat/search-motion-photo-facetfrom
feat/search-live-photo-facet
Draft

feat(search): live photo facet#3202
dschmidt wants to merge 1 commit into
feat/search-motion-photo-facetfrom
feat/search-live-photo-facet

Conversation

@dschmidt

@dschmidt dschmidt commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Stacked on #3200 (motion photo).

Draft: adds the Apple Live Photo facet to the search index, the search API and the graph driveItem.

An Apple Live Photo is a pair of files (a still + a separate .mov) linked by a shared content identifier. Maps contentId (from com.apple.quicktime.content.identifier on the video, or the Apple maker note Content Identifier on the still, parsed since metadata-extractor 2.21.0), stillImageTimeUs, auto, vitalityScore and vitalityScoringVersion. Verified against the pinned Tika 4.0 snapshot with a real .mov (com.apple.quicktime.live-photo.* atoms are surfaced generically).

Needs a separate reva change (same as #3200): the WebDAV PROPFIND handler must know the livePhoto keys. It lives in vendored reva, so it needs its own reva PR + bump:

diff --git a/vendor/github.com/opencloud-eu/reva/v2/internal/http/services/owncloud/ocdav/propfind/propfind.go b/vendor/github.com/opencloud-eu/reva/v2/internal/http/services/owncloud/ocdav/propfind/propfind.go
index d86367a2c5..815a823e11 100644
--- a/vendor/github.com/opencloud-eu/reva/v2/internal/http/services/owncloud/ocdav/propfind/propfind.go
+++ b/vendor/github.com/opencloud-eu/reva/v2/internal/http/services/owncloud/ocdav/propfind/propfind.go
@@ -107,6 +107,13 @@ var (
 		"orientation",
 		"takenDateTime",
 	}
+	livePhotoKeys = []string{
+		"auto",
+		"contentId",
+		"stillImageTimeUs",
+		"vitalityScore",
+		"vitalityScoringVersion",
+	}
 )
 
 type countingReader struct {
@@ -887,6 +894,8 @@ func metadataKeys(pf XML) ([]string, []string) {
 					metadataKeys = append(metadataKeys, metadataKeysWithPrefix("libre.graph.image", imageKeys)...)
 				case "http://owncloud.org/ns/photo":
 					metadataKeys = append(metadataKeys, metadataKeysWithPrefix("libre.graph.photo", photoKeys)...)
+				case "http://owncloud.org/ns/livePhoto":
+					metadataKeys = append(metadataKeys, metadataKeysWithPrefix("libre.graph.livePhoto", livePhotoKeys)...)
 				default:
 					metadataKeys = append(metadataKeys, key)
 				}
@@ -944,7 +953,7 @@ func requiresExplicitFetching(n *xml.Name) bool {
 		}
 	case net.NsOwncloud:
 		switch n.Local {
-		case "favorite", "share-types", "checksums", "size", "tags", "audio", "location", "image", "photo":
+		case "favorite", "share-types", "checksums", "size", "tags", "audio", "location", "image", "photo", "livePhoto":
 			return true
 		default:
 			return false
@@ -1292,6 +1301,7 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p
 			appendMetadataProp(k, "oc", "location", "libre.graph.location", locationKeys)
 			appendMetadataProp(k, "oc", "image", "libre.graph.image", imageKeys)
 			appendMetadataProp(k, "oc", "photo", "libre.graph.photo", photoKeys)
+			appendMetadataProp(k, "oc", "livePhoto", "libre.graph.livePhoto", livePhotoKeys)
 		}
 
 		if md.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER {
@@ -1579,6 +1589,10 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p
 					if k := md.GetArbitraryMetadata().GetMetadata(); k != nil {
 						appendMetadataProp(k, "oc", "photo", "libre.graph.photo", photoKeys)
 					}
+				case "livePhoto":
+					if k := md.GetArbitraryMetadata().GetMetadata(); k != nil {
+						appendMetadataProp(k, "oc", "livePhoto", "libre.graph.livePhoto", livePhotoKeys)
+					}
 				case "name":
 					appendToOK(prop.Escaped("oc:name", md.Name))
 				case "shareid":

@dschmidt dschmidt changed the title feat(search): index and expose the live photo facet feat(search): live photo facet Jul 29, 2026
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from 75dff44 to bacb762 Compare July 29, 2026 23:47
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from bacb762 to 4cf6a80 Compare July 29, 2026 23:50
@dschmidt
dschmidt force-pushed the feat/search-live-photo-facet branch from 4cf6a80 to ceb63a5 Compare July 30, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant