Add Apple Live Photo Support#1139
Open
bexelbie wants to merge 4 commits into
Open
Conversation
Add contentIdentifier optional string field to MediaMetadata and a
corresponding column in MediaEntity for storing Apple Live Photo
Content Identifier UUIDs. Add liveVideoPath (computed at response time,
not stored) and LiveVideoInfo interface for companion video metadata.
Bump DataStructureVersion 41→42.
Add ClientLivePhotoConfig with enabled boolean (default: true) under
ClientMediaConfig.LivePhoto, with uiResetNeeded: {db: true} to trigger
re-index when toggled.
MOV: Read com.apple.quicktime.content.identifier from ffprobe format
tags. HEIC: Parse Apple MakerNote IFD structure from raw exifr
makerNote bytes to extract tag 0x0011 (ContentIdentifier). Both
extraction paths are gated behind Config.Media.LivePhoto.enabled.
Tag reference: ExifTool Apple.pm by Phil Harvey.
Tests: 4 new tests covering MOV extraction, HEIC extraction, regular
video (no contentIdentifier), and disabled config (skips extraction).
Refs: bpatrik#609
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Implement Live Photo pairing in GalleryMWs.cleanUpGalleryResults: - Build contentIdentifier→video map from all videos in the response - Match photos to companion videos by contentIdentifier equality - Set liveVideoPath and liveVideoInfo on matched photos - Filter matched companion videos from the response - Unpaired videos remain visible as regular media items - Handles both directory listings (parentDir fallback) and search results (per-item directory property) Add liveVideoPath and liveVideoInfo pack/unpack support in ContentWrapper (mapped to 'l' and 'li' respectively). Tests: 5 new middleware tests covering pairing, non-matching IDs, disabled config, search results, and mixed media with unpaired videos. Refs: bpatrik#609 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add isLivePhoto() and getLiveVideoPath() to GridMedia for frontend companion video detection and URL construction. Add LIVE badge overlay in the lightbox that triggers video playback on hover (mouseenter/mouseleave) and touch (touchstart/touchend). The companion video plays muted and looped over the still image with a CSS opacity transition. The badge sits at z-index 10 to stay above the lightbox gesture handlers that would otherwise intercept mouse events on the full image area. Mobile: touch-and-hold the LIVE badge to play, release to stop. Refs: bpatrik#609 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Show a 'LIVE' text badge in the top-right corner of grid thumbnails for paired Live Photos, styled consistently with the existing video duration indicator. Add companion video details to the lightbox info panel: when viewing a Live Photo, display a two-row file info section — the photo (image icon, name, dimensions, megapixels, size) followed immediately by the companion video (video camera icon, name, dimensions, size, duration) with no visual break between rows. Refs: bpatrik#609 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Closes #609
What
Apple Live Photos (HEIC still + MOV video pairs) are displayed as a single media item with inline video playback, instead of appearing as two separate
entries.
The feature is gated behind
Client.Media.LivePhoto.enabled(default: true). Schema version 41→42 triggers a full re-index on upgrade.This is my first commit. I believe I have followed the guide in the code and met your standards. I'm happy to make changes.
Strategy
cleanUpGalleryResultswhen building the API response — no schema-level joins or foreign keys.content.identifierin MOV). No filename heuristics.contentIdentifierstays server-side only. It lives on the DB entity for indexing but is stripped before the API response — the client never sees it.UX
Commits
contentIdentifiercolumn,LiveVideoInfointerface, MakerNote parser, ffprobe extraction, config toggle, schema version bump (41→42)pairLivePhotos()in GalleryMWs,contentIdentifierstripping, ContentWrapper pack/unpack forliveVideoPath/liveVideoInfopointer-events: nonecontainer to avoid gesture conflicts, muted video elementTests