Repository navigation
Conversation
a59c002 to
2976b01
Compare
Resolve a video's poster from the live photo metadata before falling back to the picture beside it. The metadata links both halves by file id, so a video whose picture has a different name still shows the right poster. Keep the name fallback for videos without metadata, but never pair a video with an image that belongs to another live photo. Assisted-by: opencode:deepseek-v4.1-flash-free Signed-off-by: Braux Martinez <martinezjb@hitss.com>
2976b01 to
985573e
Compare
|
Hi maintainers, |
|
@bulungasdeveloper thanks for the PR! @artonge what do you think of that ? You have more knowledge than me on live photos metadata :)) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #177 +/- ##
=======================================
Coverage 92.02% 92.03%
=======================================
Files 54 54
Lines 4617 4621 +4
Branches 1006 1009 +3
=======================================
+ Hits 4249 4253 +4
Misses 343 343
Partials 25 25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
artonge
left a comment
There was a problem hiding this comment.
Yes, it makes sense!
Not sure if I was the one to introduce the original behaviour, but I think it should be safe to not even fallback to the filename comparison.
|
Thanks @susnux and @artonge for the reviews. All code and test checks are green. The only failing check is AI Policy (check-ai-trailers): it tries to add the AI assisted label, but PRs from forks get a read-only GITHUB_TOKEN, so the labels API returns 403. This is unrelated to the commit trailers. Since I only have read access to this repo, could a maintainer merge with admin override, or move the branch to the upstream repo so the workflow can use COMMAND_BOT_PAT? Thanks! |
nope, that was me and it's a customer requirement :) |
Summary
A video and a picture with the same name are not necessarily halves of the same live photo.
Resolve the poster through the DAV live photo metadata when the video carries it, and keep the
name pairing only for videos without metadata. A picture that already belongs to another live
photo is not used as a poster by name.
This makes video poster resolution symmetric with the image path, which already uses metadata.
How to test
metadata-files-live-photo.Unit tests added in
__tests__/component/media.spec.tsand__tests__/utils.spec.ts.Checklist
eslint)mainAI