-
Notifications
You must be signed in to change notification settings - Fork 685
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
Consider using uri_prefix instead of uri_scheme for backend delegation #696
Comments
👍 |
Supporting both is too nut? I mean, at the end is to match both of them against the begining of a string, isn't it? |
There is a bit more to it when multiple backends can service the same request. Either first one in order that returns a non empty list wins, or we have the first one that returns a list win, returning None for the I don't know case. So this needs to make those changes in core + test changes. |
@tkem - any thoughts how a uri like |
According to RFC3986, |
This could also be done more along the lines of an routing system (think web apps) or a rewrite system. The latter would simply be a hook that allows backend to rewrite URIs before the regular URI handling kicks in. |
Idea just came up on IRC that dz0ny's mopidy android app could have intents registered for the extensions we support, so in that case we would need to make this into something that can at least map to android's intent filtering or just outright mimic it. |
The plan is to implement |
I've been thinking over this based on the somafm bug I commented on. I think we want to allow backends to pass on answering things about prefixes they've claimed. This would allow things like having an extension handling This would be fairly simple to do for single URIs, just get a list of backends and try them one by one until one does not pass. For cases with multiple URIs it gets more complicated, at least the way I'm imagining things, i.e. we would need to make sure the semantics are simple enough. Trying to write this all out I realized we can probably get away with a simpler approach, we pick the backend with the longest prefix match and a provider of the right type. With this change things like |
Started adding a helper for prefix matching, and will try with the simplest thing we can get away with. |
Would allow for things like soundcloud mathcing
http://soundcloud.com
things and handling them instead of stream, which would just be a fallback. We could also just have a generic fallback where if nothing claims it we simply give it to audio and hope for the best.The text was updated successfully, but these errors were encountered: