feat(mobile): enable local motion photo playback#27004
Closed
dnplkndll wants to merge 1 commit intoimmich-app:mainfrom
Closed
feat(mobile): enable local motion photo playback#27004dnplkndll wants to merge 1 commit intoimmich-app:mainfrom
dnplkndll wants to merge 1 commit intoimmich-app:mainfrom
Conversation
|
Label error. Requires exactly 1 of: changelog:.*. Found: 📱mobile, llm-generated. A maintainer will add the required label. |
Contributor
|
This PR has been automatically closed as the description doesn't follow our template. After you edit it to match the template, the PR will automatically be reopened. |
Contributor
|
Thank you for your interest in contributing to Immich! Unfortunately this PR looks like it was generated using an LLM. As noted in our CONTRIBUTING.md, we request that you don't use LLMs to generate PRs as those are not a good use of maintainer time. |
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.
Description
Enables local (on-device) motion photos and live photos to play in the asset viewer. Previously only remote assets triggered the video component — assets with a local copy never animated.
This is a cleaned-up version of the work started by @LeLunZ in draft PR #26784. The prerequisite
playbackStyleinfrastructure from that series (#26541, #26596, #26747) was merged but the motion photo playback follow-up was left as a draft. This PR completes that work, resolves a circular dependency inbase_asset.model.dartthat appeared after the infrastructure landed, and polishes it for submission. All credit for the core approach goes to @LeLunZ.Fixes #23525
video_viewer.widget.dartvideoAsset.isMotionPhototo select the right local file: motion assets usegetMotionFileById(fetches the paired subtype viaoriginFileWithSubtype), regular videos usegetFileForAssetthumbnail_tile.widget.dartasset is RemoteAsset && asset.livePhotoVideoId != nulltoasset.isMotionPhoto— shows the icon for local motion photos toostorage.repository.dartgetMotionFileById(String assetId)fromgetMotionFileForAsset(LocalAsset asset)so the viewer can call it with a raw ID (needed when the resolved asset is aRemoteAssetwith alocalId)base_asset.model.dartisMotionPhotodelegates toplaybackStyle;playbackStyleuseslivePhotoVideoId != nulldirectlylivePhotoVideoId) and local (resolved playback style) pathsHappy to make any changes before merging. @LeLunZ — if there was anything else you had planned for the original PR, please let me know and I'll incorporate it.
How Has This Been Tested?
Screenshots (if appropriate)
Checklist:
src/services/uses repositories implementations for database calls, filesystem operations, etc.src/repositories/is pretty basic/simple and does not have any immich specific logic (that belongs insrc/services/)Please describe to which degree, if any, an LLM was used in creating this pull request.
Claude (claude-sonnet-4-6) was used to assist with code review, refactoring suggestions, and drafting the PR description. All code changes were reviewed and tested manually on device.