dtcooper / raspotify

A Spotify Connect client that mostly Just Works™
https://dtcooper.github.io/raspotify
MIT License
4.63k stars 213 forks source link

Interface with Python #532

Closed Grandpa-G closed 2 years ago

Grandpa-G commented 2 years ago

Due Diligence

What can we help you with?

Is there a way to interface with raspotify from a Python script to start playing a track given a track id as input? This will be run on a Rpi4. I would like to be able to start/stop/pause a song. The OS will be bullseye.

JasonLG1979 commented 2 years ago

No, it's not possible currently to directly control the librespot binary. There are more than few Spotify Web API bindings in about every language. I'm about 99.99% sure there's at least a couple written in Python. I'm pretty sure you can control librespot indirectly though those bindings since librespot just looks like another Spotify Connect device to Spotify.

That's also not to say that a person couldn't write a direct control API for librespot.

JasonLG1979 commented 2 years ago

I'm converting this to a discussion since it's a very broad topic.