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

Extend MPD protocol with spotify-specific commands #39

Open
arybczak opened this issue Dec 19, 2020 · 4 comments
Open

Extend MPD protocol with spotify-specific commands #39

arybczak opened this issue Dec 19, 2020 · 4 comments

Comments

@arybczak
Copy link

Hey,

ncmpcpp author here. I've been recently looking into using ncmpcpp with mopidy-spotify so that I don't have to alternate between MPD and the official Spotify client.

However, it looks like it's not possible to have more specific control over Spotify with the MPD protocol, e.g. adding tracks/albums/artists to the collection.

I thought about it for a while and the potential solutions I see are:

  1. Make it possible for ncmpcpp to use mopidy-http api instead of the MPD protocol
  2. Extend mopidy-mpd with spotify-specific commands so that ncmpcpp (or other mopidy-compatible MPD clients) can support them conditionally after inspecting the output of commands.
  3. Give up and fall back to MPD/Spotify.

(1) is a lot of work that I don't have time for and (3) isn't very satisfying, so I'd like to tackle (2) if the idea makes sense to you.

@kingosticks
Copy link
Member

What sort of Spotify specific things are you wanting to do? We don't have any support for manipulating the user's My Music collection. Is that the "collection" you are referring to?

@arybczak
Copy link
Author

arybczak commented Dec 19, 2020

We don't have any support for manipulating the user's My Music collection. Is that the "collection" you are referring to?

Yes. Hmm. I looked at mopidy-iris and it can at least

  • add tracks from queue to collection (but can't remove them)
  • add albums from search to collection (can remove them)

Doesn't it do it through mopidy?

Looks like it can't add/remove artists though.

Is adding support for these operations to mopidy-spotify problematic in any way?

@kingosticks
Copy link
Member

kingosticks commented Dec 19, 2020

No, it doesn't go through Mopidy. Iris does some calls directly to Spotify's Web API. That's why you have to authorise Iris separately.

Traditionally Mopidy-Spotify only supported things provided by libspotify (which is deprecated and pre-dates My Music, Spotify Connect , etc). We've been moving things over to the Web API where it makes sense. But Mopidy's Core API doesn't have anything that obviously maps to the Spotify-specific My Music collection. We try to avoid anything backend-specific. We might be able to support it through a special playlist, but we don't do that currently.

Edit: if someone comes up with a way of supporting this feature within the constrains of the Mopidy Core API then there's no reason not to add that to Mopidy-Spotify. Even better if it could even fit within the MPD protocol also. If we would need to change the Core API then we'd much prefer to come up with something backend-agnostic.

@stacyharper
Copy link

stacyharper commented Jul 12, 2021

I just discovered it is impossible to search through playlists with mopidy-mpd (spotify playlists in this example).

Is it possible to add some mpd tag ("Playlist") so that requests like "mpc search Playlist foobar" would result in spotify uris ? Or is it something that Mopidy-Spotify should do ? Ideally I'd like not to use the Web extensions for this.

(Anyway it looks like clients like ncmpcpp would not be able to handle those extended tags but maybe the "any" tag would be enough for most use cases).

What are you thoughs about this ? Doable ? Recommendable ?

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

No branches or pull requests

3 participants