From 4ad511dfffb37517c8423fb7076c8808ceb81036 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Sun, 12 Apr 2026 00:31:17 +0200 Subject: [PATCH 1/3] Enhance OpenAPI spec with Motion Photo attributes Added properties for Motion Photo metadata including version and presentation timestamp. --- api/openapi-spec/v1.0.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/api/openapi-spec/v1.0.yaml b/api/openapi-spec/v1.0.yaml index da69c85..ca538dc 100644 --- a/api/openapi-spec/v1.0.yaml +++ b/api/openapi-spec/v1.0.yaml @@ -5137,6 +5137,31 @@ components: type: string format: date-time description: Represents the date and time the photo was taken. Read-only. + '@libre.graph.motionPhoto': + type: integer + format: int32 + readOnly: true + description: | + Indicates whether the file is a Motion Photo (a still image with an embedded video clip). + 1 means the file should be treated as a Motion Photo, 0 or absent means it should not. + Based on Camera:MotionPhoto from the Google Motion Photo format specification. + https://developer.android.com/media/platform/motion-photo-format + '@libre.graph.motionPhotoVersion': + type: integer + format: int32 + readOnly: true + description: | + The file format version of the Motion Photo. Currently always 1. + Based on Camera:MotionPhotoVersion from the Google Motion Photo format specification. + '@libre.graph.motionPhotoPresentationTimestampUs': + type: integer + format: int64 + readOnly: true + description: | + Presentation timestamp in microseconds of the video frame that corresponds to the still image. + A value of -1 indicates unspecified. If absent, readers should use a timestamp near the + middle of the video track. + Based on Camera:MotionPhotoPresentationTimestampUs from the Google Motion Photo format specification. geoCoordinates: type: object readOnly: true From 791d7e7f44e2dea0e5aca4492639f90b98cf2803 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Sun, 12 Apr 2026 15:15:37 +0200 Subject: [PATCH 2/3] Add motionPhotoVideoSize to OpenAPI specification Added motionPhotoVideoSize property to the OpenAPI spec. --- api/openapi-spec/v1.0.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/openapi-spec/v1.0.yaml b/api/openapi-spec/v1.0.yaml index ca538dc..9cb44ad 100644 --- a/api/openapi-spec/v1.0.yaml +++ b/api/openapi-spec/v1.0.yaml @@ -5162,6 +5162,14 @@ components: A value of -1 indicates unspecified. If absent, readers should use a timestamp near the middle of the video track. Based on Camera:MotionPhotoPresentationTimestampUs from the Google Motion Photo format specification. + '@libre.graph.motionPhotoVideoSize': + type: integer + format: int64 + readOnly: true + description: | + Size in bytes of the embedded video portion of the Motion Photo. + Clients can use this together with the file size to construct a Range request + that fetches only the video part: Range: bytes=- geoCoordinates: type: object readOnly: true From fb6c9b6e0a5e903bb0735aa51092f9a00b762a0b Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Tue, 21 Apr 2026 16:37:42 +0200 Subject: [PATCH 3/3] refactor: model Motion Photo as a standalone facet on driveItem Per review feedback on #36: move Motion Photo metadata from flat properties on the `photo` facet to a dedicated `@libre.graph.motionPhoto` facet on `driveItem`, parallel to `photo`/`audio`/`video`. Presence of the facet on a driveItem signals that it is a Motion Photo, so the separate `@libre.graph.motionPhoto` (int flag) property is dropped. Nested properties lose the `motionPhoto*` prefix since they're now scoped by the facet: `version`, `presentationTimestampUs`, `videoSize`. Consistent with how MS Graph models file/folder/photo/audio/video facets (presence = type signal) and leaves room for future Motion Photo metadata without polluting the `photo` facet's namespace. --- api/openapi-spec/v1.0.yaml | 50 ++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/api/openapi-spec/v1.0.yaml b/api/openapi-spec/v1.0.yaml index 9cb44ad..66d8aef 100644 --- a/api/openapi-spec/v1.0.yaml +++ b/api/openapi-spec/v1.0.yaml @@ -4914,6 +4914,9 @@ components: video: description: Video metadata, if the item is a video. Read-only. $ref: '#/components/schemas/video' + '@libre.graph.motionPhoto': + description: Motion Photo metadata, if the item is a Motion Photo. Read-only. + $ref: '#/components/schemas/motionPhoto' '@client.synchronize': description: Indicates if the item is synchronized with the underlying storage provider. Read-only. type: boolean @@ -5137,39 +5140,38 @@ components: type: string format: date-time description: Represents the date and time the photo was taken. Read-only. - '@libre.graph.motionPhoto': - type: integer - format: int32 - readOnly: true - description: | - Indicates whether the file is a Motion Photo (a still image with an embedded video clip). - 1 means the file should be treated as a Motion Photo, 0 or absent means it should not. - Based on Camera:MotionPhoto from the Google Motion Photo format specification. - https://developer.android.com/media/platform/motion-photo-format - '@libre.graph.motionPhotoVersion': + motionPhoto: + type: object + readOnly: true + description: | + Motion Photo metadata. A Motion Photo is a still image with a short video clip appended to + the end of the file. The presence of this facet on a driveItem indicates that the item is + a Motion Photo; absence indicates it is not. + + Based on the Google Motion Photo format v1.0 specification: + https://developer.android.com/media/platform/motion-photo-format + properties: + version: type: integer format: int32 + description: The file format version of the Motion Photo. Currently always 1. Read-only. readOnly: true - description: | - The file format version of the Motion Photo. Currently always 1. - Based on Camera:MotionPhotoVersion from the Google Motion Photo format specification. - '@libre.graph.motionPhotoPresentationTimestampUs': + presentationTimestampUs: type: integer format: int64 - readOnly: true description: | - Presentation timestamp in microseconds of the video frame that corresponds to the still image. - A value of -1 indicates unspecified. If absent, readers should use a timestamp near the - middle of the video track. - Based on Camera:MotionPhotoPresentationTimestampUs from the Google Motion Photo format specification. - '@libre.graph.motionPhotoVideoSize': + Presentation timestamp in microseconds of the video frame that corresponds to the still + image. A value of -1 indicates unspecified. If absent, readers should use a timestamp + near the middle of the video track. Read-only. + readOnly: true + videoSize: type: integer format: int64 - readOnly: true description: | - Size in bytes of the embedded video portion of the Motion Photo. - Clients can use this together with the file size to construct a Range request - that fetches only the video part: Range: bytes=- + Size in bytes of the embedded video portion of the file. The video is appended at the + end of the file, so clients can fetch it with a Range request: + `Range: bytes=-`. Read-only. + readOnly: true geoCoordinates: type: object readOnly: true