Skip to content

fix: discover Chromecast devices via mDNS#19

Closed
fenio wants to merge 1 commit into
stupside:mainfrom
fenio:fix/chromecast-discovery
Closed

fix: discover Chromecast devices via mDNS#19
fenio wants to merge 1 commit into
stupside:mainfrom
fenio:fix/chromecast-discovery

Conversation

@fenio

@fenio fenio commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • discover Chromecast devices advertised through _googlecast._tcp mDNS
  • run Chromecast and DLNA discovery concurrently within the existing scan timeout
  • map the advertised friendly name and IPv4 address into the existing device connection flow
  • keep partial scan results when one discovery protocol fails

This should improve #5 by making Chromecast devices appear in castor scan. Discovery was verified on real hardware: a JBL Link View advertised as Office Display was found at its LAN address. Playback was not exercised as part of this change.

Tests

  • go test ./...
  • go vet ./internal/device
  • castor scan against a LAN with DLNA and Chromecast devices

@stupside stupside added the enhancement New feature or request label Jul 19, 2026
@stupside

Copy link
Copy Markdown
Owner

Thanks! #20 landed the same fix ~25 min earlier with dedupe, IPv6 and cast-group port handling, so #21 builds on that, but your test approach went in there too and you're credited via Co-Authored-By. Closing in favor of #21. 🙏

@stupside stupside closed this Jul 19, 2026
birhantprkc pushed a commit to birhantprkc/castor that referenced this pull request Jul 20, 2026
Extract the entry->Info mapping out of discoverChromecast into a testable
chromecastInfo helper and cover it: IPv4/IPv6 selection, DeviceName->Name->Host
fallback, non-default cast-group ports, and rejection of address-less entries.
Fold the name and dedupe fallbacks into cmp.Or.

This branch combines the two parallel fixes for stupside#5: the discovery
implementation from stupside#20 and the test approach from stupside#19.

Co-authored-by: Nerijus Baliūnas <591932+nerijus@users.noreply.github.com>
Co-authored-by: Bartosz Fenski <fenio@debian.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants