Immich: play videos when the "Play videos" setting is on#145
Merged
Conversation
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
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.
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
ImmichSource—listImageUrlsbecomeslistMedia(..., includeVideo). With "Play videos" on, thePOST /api/search/metadatarequest drops the server-side type filter and acceptsIMAGE/VIDEOclient-side (preserving library order, still album-filtered). Videos map to the streaming endpointGET /api/assets/{id}/video/playback; images keep the preview thumbnail. With the setting off, the request is unchanged.PhotoFrameSource.Immich— carriesincludeVideofrom the existing setting, same as the folder source.PhotoFrameController— the remote slideshow tracks which URLs are videos and streams them through the sharedVideoViewviasetVideoURI(uri, headers), so thex-api-keyheader 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.PhotoFrameSourceTest, addedImmichSourceTestfor the URL/auth helpers, refreshed the Immich row indocs/features/screensaver.md.Testing
./gradlew :app:testDebugUnitTest— green locally (Gradle 9.4.1, SDK platform 36, mirroringtests.yml).🤖 Generated with Claude Code
https://claude.ai/code/session_01SiZKi8ubqa9kmX9EGXrqGR
Generated by Claude Code