Skip to content

Type RemoteDevice fields and unify UPnP HTTP handling - #9

Merged
yinnho merged 1 commit into
masterfrom
refactor/typed-remote-device
Sep 2, 2026
Merged

Type RemoteDevice fields and unify UPnP HTTP handling#9
yinnho merged 1 commit into
masterfrom
refactor/typed-remote-device

Conversation

@yinnho

@yinnho yinnho commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Typed RemoteDevice: details: Map<String, Any> removed; devices now carry locationUrl and services: List<ServiceInfo> directly (ServiceInfo promoted from DeviceDescriptionParser to a top-level class). buildServiceUrl, cast service checks and TV detection use typed fields instead of unchecked casts
  • Unified UpnpHttp: device description retrieval (GET, 3-attempt linear backoff preserved) and SOAP control requests (POST) share one internal executor with consistent timeouts, User-Agent and connection cleanup
  • Completes the v1.3.0 roadmap items started in Add unit tests and extract testable pure helpers #8; no public API change

Test plan

  • ./gradlew test lint assembleRelease passes locally (69/69 tests)
  • CI green
  • Real-device smoke: search → cast → controls still work against an actual renderer

Replace RemoteDevice's Map<String, Any> details bag with typed
locationUrl and services fields (ServiceInfo promoted to a top-level
class), so service URL resolution and TV detection read typed values
instead of unchecked casts. Route device description GETs and SOAP
POSTs through a shared UpnpHttp executor for consistent timeouts,
headers and connection handling. No public API change.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yinnho
yinnho merged commit 39dd48a into master Sep 2, 2026
2 checks passed
@yinnho
yinnho deleted the refactor/typed-remote-device branch September 2, 2026 10:22
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