Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handling device auto-discovery as first class sources #169

Open
5 tasks
FoxxMD opened this issue Jul 19, 2024 · 0 comments
Open
5 tasks

feat: handling device auto-discovery as first class sources #169

FoxxMD opened this issue Jul 19, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@FoxxMD
Copy link
Owner

FoxxMD commented Jul 19, 2024

Chromecast currently uses mdns for autodiscovery (and MPD supports it). However handling discovering within the chromecast source leaves something to be desired:

  • the checkConnection and testAuth stages are bypassed due to having multiple connection
    • connection testing is still done but had to be implemented speparately
  • a lot of work went into converting found devices into a "per-device" data structure for use with multiPlatform even though it doesn't really work that way

This same work would need to be done to implement auto-discovery for MPD...it would be a duplication of effort while not utilizing the existing logic for sources.


Instead, we should implement a "discovery manager" service that generates ephemeral sources from auto-discovered devices using the config for that source as a base. This would enable re-using all the stage logic. We could additionally have a removeAfterIdle option for the source to delete the ephemeral source if it disappears for X minutes so that the dashboard and overall list of sources stays lean in the event many short-lived devices are found.

Things to think about:

  • discovery manager needs a place to live in the ms lifecycle
  • task schedule for re-discovery and pruning after idle
  • sources need to be marked as ephemeral
    • what does this entail for dashboard usage?
  • managing deduplication between explicitly configured source and auto-discovered (need to require a unique id is derived)
  • Determine and document differences between device discovery and single source with multi-platform devices
@FoxxMD FoxxMD added the enhancement New feature or request label Jul 19, 2024
@FoxxMD FoxxMD self-assigned this Jul 19, 2024
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

No branches or pull requests

1 participant