Skip to content

Moments carry the display width and height; kinlore:media-dimensions fills older media - #5

Merged
elyess merged 1 commit into
mainfrom
feat/media-dimensions
Nov 27, 2026
Merged

elyess merged 1 commit into
mainfrom
feat/media-dimensions

Conversation

@elyess

@elyess elyess commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Migration: nullable width and height on moments. Photos get the size after EXIF orientation from the preview decode; videos from the upright processed frame.
  • The moment API and sync pull send width and height (null for text moments and unknown sizes). Older apps ignore them.
  • php artisan kinlore:media-dimensions (--dry-run) fills older photos from their preview and videos from their processing data, and bumps updated_at, so phones get the sizes on their next sync. Run it once after this update.
  • For the app's justified timeline (Kinlore/kinlore-mobile, branch feat/justified-timeline).

Checks

  • php artisan test: 253 passed, 1 skipped (new MomentDimensionsTest).
  • Real ffmpeg 9.1 against a local server: a 640x360 video stays 640x360; the same video with a 90° rotation tag is stored as 360x640.
  • Eight photos (portrait, landscape, square, 16:9, 9:16, panorama) report their real sizes after upload.

…; kinlore:media-dimensions fills older media

- Migration: nullable width and height on moments; photos get them after orientation from the preview decode, videos from the upright processed frame
- Moment API and sync pull send width and height (null for text moments and unknown sizes)
- kinlore:media-dimensions (--dry-run): fills older photos from their preview and videos from their processing data; bumps updated_at so phones get the size on their next sync
- Tests: MomentDimensionsTest; docs: API, commands, updating (run the command once after updating)
@elyess
elyess merged commit 57b67db into main Nov 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant