Skip to content

Return full search results and real playback state - #4

Merged
yinnho merged 1 commit into
masterfrom
fix/search-and-playback-state
Sep 2, 2026
Merged

Return full search results and real playback state#4
yinnho merged 1 commit into
masterfrom
fix/search-and-playback-state

Conversation

@yinnho

@yinnho yinnho commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • DLNACast.search() now resolves after the timeout with the complete device list — previously it resolved as soon as the first device responded, so multi-device homes only ever saw one TV
  • New DLNACast.getPlaybackState() performs a live GetTransportInfo query, so a pause/stop triggered on the device (remote control) is now visible to the app; getState() reports the last observed transport state instead of always claiming PLAYING while connected
  • Progress interpolation only advances while the transport state is PLAYING (was: any media with a known duration was treated as playing, so paused playback drifted forward)
  • Cache isolation: switching devices drops all cached volume/progress; re-casting on the same device resets only progress

Test plan

  • ./gradlew test lint assembleRelease green locally
  • Demo app compiles unchanged (all signatures source-compatible; getState() display handles all states already)
  • Manual: pause via TV remote and confirm getPlaybackState() returns PAUSED — needs a real device

- search() now resolves after the timeout with the complete device list
  instead of returning as soon as the first device responds; the internal
  search callback carries a `complete` flag
- Add DLNACast.getPlaybackState(): live GetTransportInfo query so remote
  pauses/stops are visible; getState() reports the last observed transport
  state instead of always PLAYING while connected
- Progress interpolation only advances when the transport state is PLAYING
  (previously any media with a known duration counted as playing)
- Isolate caches per device: switching devices clears all cached state,
  re-casting on the same device resets only the progress cache

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yinnho
yinnho merged commit f8bc99f into master Sep 2, 2026
2 checks passed
@yinnho
yinnho deleted the fix/search-and-playback-state branch September 2, 2026 09:10
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