GithubHelp home page GithubHelp logo

Comments (6)

dieser-niko avatar dieser-niko commented on August 24, 2024

In order to activate them, just use sp.start_playback/sp.transfer_playback with the parameter device_id with the device ID from the sp.devices() list.

from spotipy.

adamf avatar adamf commented on August 24, 2024

Another wrinkle: How do I make the local audio interface available as a device if it is not in the devices list?

from spotipy.

dieser-niko avatar dieser-niko commented on August 24, 2024

Well, that's not possible with the Spotify API. But you can find other ways to play Spotify on the device you want. For example, on Android, I want autoplay when I connect to a Bluetooth audio device. But since I installed the latest software update, that's no longer possible.

So I've built a little application (or so-called "Flow") using an app called Automate to create my own autoplay. It's pretty straightforward and there are definitely ways to make your Python script communicate with a flow if you need to.

Obviously my example has nothing to do with the Spotify API, but you get my point. Something like that would make it possible for the Spotify app to wake up and show up in the device list on its own.

There are also apps like Tasker. I've never tried it out, so I don't know if it would even work, but it seems to be quite popular.

On PC you just have to make sure that Spotify is open and online in order to let it show up in the devices list. If not, then it shouldn't be a big hassle to let Python open Spotify.

from spotipy.

dieser-niko avatar dieser-niko commented on August 24, 2024

I should add that Automate is a powerful app and can really mess up your smartphone. So make sure to use it responsibly.

from spotipy.

adamf avatar adamf commented on August 24, 2024

This is on a raspberry pi, so I think the automation would probably be something like start a headless chrome instance, somehow log it into the spotify web app, then use that device. Or just buy the mp3s I want to play from the command line :)

from spotipy.

adamf avatar adamf commented on August 24, 2024

This is resolved - it's not possible to activate a new device with pure spotipy.

from spotipy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.