Skip to content

Fix Google Photos pagination & high-res portraits (closes #155) - #168

Open
starbrightlab wants to merge 1 commit into
mainfrom
fix/155-google-photos-pagination
Open

Fix Google Photos pagination & high-res portraits (closes #155)#168
starbrightlab wants to merge 1 commit into
mainfrom
fix/155-google-photos-pagination

Conversation

@starbrightlab

Copy link
Copy Markdown
Owner

Cherry-picks @miguelsg29's Google Photos fix (8a31dec, originally in #164) onto a clean branch off main, decoupled from the Spanish i18n sweep so it can land on its own. Authorship preserved.

What it does (closes #155)

  • Pagination: crawls the Google Photos shared-album batchexecute RPC (extractGoogleAlbumKey / extractGoogleContinuationToken / fetchGoogleBatchRpc in RemoteAlbum.kt) so albums with >30 photos load beyond the initial HTML chunk (hard-capped at 100 pages / 10k photos).
  • High-res portraits: CDN suffix =w{maxDim}-h{maxDim}-no at max screen dimension; aspect-preserving background blur, dual-layer crossfade, clipped Ken-Burns frame, and an opt-in cropVertical toggle (added as a BoolSpec, tripwire-clean).

Review notes (from deep review)

  • Fails safe: every new path returns page-1 results or falls back to the built-in feed on error, so it can't regress today's behaviour.
  • ⚠️ Pagination is best-effort: the continuation-token regex leans on undocumented Google internals and may not match the real cursor for every album, so the "~30-photo cap" symptom could persist in the field for some albums and will rot if Google changes their payload. The high-res/portrait half is solid. Worth confirming against a real >30-photo album before we consider google photos screensaver only showing 30 pics in album of approx 8,000 pics #155 fully closed.
  • Nit (not blocking): the box blur runs on the main thread per portrait/fit transition (PhotoFrameController.kt:1591) — a per-transition hitch on the Portal CPU; ideally moved to the io executor in a follow-up.

Testing

  • ./gradlew :app:compileDebugKotlin + RemoteAlbumTest — green. (The new tests cover the key/token extractors against fixtures; they don't exercise a real Google payload.)

Closes #155. Original work by @miguelsg29 (split out of #164).

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.

google photos screensaver only showing 30 pics in album of approx 8,000 pics

2 participants