Comments (5)
This is how you get spotify.
import spotipy
from spotipy.oauth2 import SpotifyOAuth
clientid = 'SOME ID'
clientsecret = 'SOME SECRET'
scope = "app-remote-control,playlist-modify-private,playlist-read-private,user-library-read,user-modify-playback-state,user-read-currently-playing,user-read-playback-position,user-read-playback-state"
oauth=SpotifyOAuth(scope=scope,client_id=clientid,client_secret=clientsecret,redirect_uri='http://localhost:9999',open_browser=False)
oauth.get_access_token()['access_token']
But apart from that I don't know how to start Spotify on Chromecast
from pychromecast.
Looks like Spotify support was removed in #535 because it was hosted by the spotcast project.
Unfortunately the spotcast project is not maintained anymore https://camo.githubusercontent.com/a9058f39b5fc70fadc797d9b38617c1fc7c6c3d8567744c67e247d0c341d047c/68747470733a2f2f696d672e736869656c64732e696f2f6d61696e74656e616e63652f7965732f323032322e737667
from pychromecast.
So can we add the spotify controller again?
from pychromecast.
I tried to hack in the latest available Spotify controller (release 9.2.0) in the 13.0.8 release.
When launching Spotify on the Google Nest Hub second gen, the Spotify UI splash screen keeps hanging and the launch app will timeout. This was done by using a "normal" Spotify token.
It looks like the 9.2.0 Spotify example is dependant on the spotify_token lib.. This lib will generate a "more permissions" token. However this lib seems to be broken for some time...
Currently I do not know if my attempt failed because i did something wrong, the old code does not integrate anymore or the token that I did use has not enough rights. I expect that the token might be the issue but I do not have the knowledge to debug that unfortunately.
from pychromecast.
Landed here after working on this same problem for a while, spotipy won't recognize the google assistant device if it's not already playing something.
from pychromecast.
Related Issues (20)
- ValueError: too many values to unpack (expected 5)
- Discovery doesn't work in an async context HOT 5
- Data difference when using GoogleTV Youtube vs Casting
- Custom http headers
- Idle chromecast custom screen example
- Command feedback
- Detect tv is on or off
- SiriusXM/Chromecast Casting Issue HOT 9
- Cannot initialize 'Chromecast' class HOT 2
- Not working with updated modules ('str' object has no attribute 'cast_type') HOT 1
- How to know if a specific connected TV is compatible ? HOT 1
- BBC Sounds conroller stopped working HOT 3
- Python 3.10 Depreciation Warning ssl.SSLContext()
- BBC iPlayer Live Stream - unable to get working
- Join existing chromecast session without interrupting it?
- pychromecast entering spin loop when a cast device reboots [if browser.stop_discovery() was called] HOT 2
- Mocking Chromecast?
- How to handle AssertionError for assert self.socket is not None?
- WARNING:pychromecast.controllers:SEEK command requested but no session is active HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pychromecast.