Skip to content

Immich: play videos when the "Play videos" setting is on#145

Merged
starbrightlab merged 1 commit into
mainfrom
claude/immich-screensaver-videos-v2bnte
Jul 9, 2026
Merged

Immich: play videos when the "Play videos" setting is on#145
starbrightlab merged 1 commit into
mainfrom
claude/immich-screensaver-videos-v2bnte

Conversation

@starbrightlab

Copy link
Copy Markdown
Owner

Problem

Choosing Immich as the screensaver photo source (album or whole library) only ever showed photos — videos were skipped even with the Play videos setting on. The Immich source hard-filtered its metadata search to type: "IMAGE", and the setting was only wired to the local-folder source.

Changes

  • ImmichSourcelistImageUrls becomes listMedia(..., includeVideo). With "Play videos" on, the POST /api/search/metadata request drops the server-side type filter and accepts IMAGE/VIDEO client-side (preserving library order, still album-filtered). Videos map to the streaming endpoint GET /api/assets/{id}/video/playback; images keep the preview thumbnail. With the setting off, the request is unchanged.
  • PhotoFrameSource.Immich — carries includeVideo from the existing setting, same as the folder source.
  • PhotoFrameController — the remote slideshow tracks which URLs are videos and streams them through the shared VideoView via setVideoURI(uri, headers), so the x-api-key header rides along with the stream. Same semantics as local folder videos: muted, advance on completion, skip on error, fall back to the built-in feed after a full failure loop.
  • Updated PhotoFrameSourceTest, added ImmichSourceTest for the URL/auth helpers, refreshed the Immich row in docs/features/screensaver.md.

Testing

  • ./gradlew :app:testDebugUnitTest — green locally (Gradle 9.4.1, SDK platform 36, mirroring tests.yml).
  • On-device behaviour notes: videos stream directly from the Immich server (first frame may take a moment on large clips while the server transcodes) and play muted, like folder videos.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SiZKi8ubqa9kmX9EGXrqGR


Generated by Claude Code

The Immich source hard-filtered the metadata search to type IMAGE, so an
album (or the whole library) never showed its videos even with the
screensaver's "Play videos" toggle enabled — unlike the local-folder
source, which honours it.

- ImmichSource.listMedia replaces listImageUrls: when includeVideo is on
  the search drops the server-side type filter and accepts IMAGE/VIDEO
  client-side (keeping library order); videos map to the
  /api/assets/{id}/video/playback streaming endpoint.
- PhotoFrameSource.Immich carries includeVideo from the existing setting.
- PhotoFrameController streams remote videos through the shared VideoView
  via setVideoURI(uri, headers) so the x-api-key rides along — muted,
  advance-on-completion, skip-on-error, same as local folder videos.

Fixes Immich albums showing photos only despite "Play videos".

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiZKi8ubqa9kmX9EGXrqGR
@starbrightlab starbrightlab merged commit 5ea8705 into main Jul 9, 2026
3 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.

2 participants