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

Feature request: expand backend-interrogation API #1507

Open
jcass77 opened this issue May 8, 2016 · 3 comments
Open

Feature request: expand backend-interrogation API #1507

jcass77 opened this issue May 8, 2016 · 3 comments
Labels
A-core Area: Core layer C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal

Comments

@jcass77
Copy link
Member

jcass77 commented May 8, 2016

It would be useful if frontend extensions could get an indication of which features are supported by each backend that has been loaded, in order to adapt the UI accordingly.

Some of this is already available in mopidy.backend.Backend:

  • has_library
  • has_library_browse
  • has_playback
  • has_playlists

This could probably be extended with things like:

P.S. I think we've discussed this somewhere before but I couldn't find the relevant issue / thread just now, apologies if this is a duplicate.

@adamcik
Copy link
Member

adamcik commented May 8, 2016

Most of these make sense and should be exposed in some way. The one I don't think belongs here is is_stream, I think this is more suited as a per "track" property to be honest.

@tkem
Copy link
Member

tkem commented May 8, 2016

@jcass77: I guess you're referring to #1108
In addition to the above, I'd also add a get_friendly_name(), which could be used as a user-friendly label when for example presenting a list of backends to include in a search. Eventually this could also take an optional locale parameter for localization.

@ismailof
Copy link
Contributor

ismailof commented Jun 6, 2016

As I'm developing a (yet another) GUI client for Mopidy using the websockets interface, I find all af this info (bakcends available, description, capabilities) extreamly interesting.

However, I would find easier for both backends and clients to have the info attached to a Backend model instead of multiple/API changing functions. Thus, the info provided by backends can be extendable without changing the APIs, just extending the model, and there can be some optional fields (for instance, the icon) along with some other compulsory.

Then, we could get all of the info with two functions like list_backends(), and 'get_backend_info(backend)' or alike.

@adamcik adamcik added C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal A-core Area: Core layer labels Jun 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core layer C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal
Projects
None yet
Development

No branches or pull requests

4 participants