-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
Play on other devices #132
Conversation
Added 'user' authentication to make this possible.
(forgot to mention this is still a beta feature of the spotify web-api) |
Closing this PR because I've already merged a larger one that includes these changes. |
was this ever merged into the main branch I cant seem to get it to work? |
No, not yet. Harish has created a separate branch: 3.0-pre If you use that branch, it works like this: List possible devices for playback: To connect and play from another device: true/false indicates if a device is active or not. The numbers show the spotify volume settings. |
ahhh got it. |
Ah, yes... good of you to mention that. Completely forgot I had to whitelist that URL. Here's how:
|
I'll add that info to the 'help' part |
hmm I had added it but I just removed the app from my dashboard and readded it and now it works! thanks for your help! |
did you include the removal of jq in this branch? seems it still requires it |
Indeed, jq is still required. The relative ease of use of jq vs trying to parse json output with commands like grep/awk/tr/cut makes it 1:0 for jq in my opinion. |
ahh got it, im trying to put a device list into my menubar so I can choose my devices easily without opening Spotify but both apps that can achieve this (bettertouchtool and bitbar) dont seem to be compatible with jq unfortunately. |
I don't get it, sorry ;) I assume with bitbar/bettertouchtool you call shpotify to list your available devices / select your playback devices, right? The output you get from shpotify does not require jq, it's only used to parse the json feedback from spotify. |
ah, thanks, now I think I get it :) My guess is that jq is not in $PATH of the 'user' running the script. Best way is to add the full path to shpotify. It's fixed in my latest 3.0 version (#144) or found here: https://github.com/davidem/shpotify/tree/3.0 |
I've updated the JQ check. It first checks $PATH, then it checks if jq is in /usr/local/bin. @moshed: does it now work for you? |
hmm still not. my script is this with the full Spotify path
but I still get the same jq error as before? |
Can you show me where jq is located? Mine:
I'll add an option to hardlink to jq later today |
same as you
|
hey @davidem sorry to be a pain. do you have an idea why jq is not functioning properly when called from bitbar or better touch tool? should I be changing one of these settings? |
Hi Moshed, I've just installed bettertouchtool. I'll try to figure this out once and for all ;) |
Hi Moshed, do you use my latest version? I've added a 'find' command a few weeks back to search for jq in /usr/local/bin, just in case it's not in PATH. It can be found here: https://github.com/davidem/shpotify/tree/3.0. Its changes have not yet been merged. When I use bettertouchtool + my version of shpotify, it works like a charm. Note that 'list devices' also requires jq. If I disable 'find' in the script, it fails with the same error you get. |
it works! great news! thanks so much! |
I've made options to list and play on other devices, like phones, computers, spotify connect devices, the like. It's using the authorisation part also used for listing one's playlists. Please note that i've added a few extra 'scopes', which means a possible existing 'refresh-token' needs to be removed.
Use
list devices
to list possible devices. Devices must be active, there's currently no history. It poops out the device id, name, type, used and volume level.Use
connect <device_id>
to select and play on a device. To connect by 'name' does not work (yet)What do you think? :)