Commands to play songs and playlists from terminal

Solved!
Reply

Re: Commands to play songs and playlists from terminal

RadioactiveRadz
Casual Listener
Try on mac osascript -e 'tell application "spotify" to play'

Re: Commands to play songs and playlists from terminal

chadlavi
Newbie

@RadioactiveRadz, Do you know if this can take parameters for a playlist or song name?

Re: Commands to play songs and playlists from terminal

olejon
Roadie

Deleted

SpotCommander - The most elegant, intuitive, feature-rich & universal remote control for Spotify, exclusive for Linux users!

Re: Commands to play songs and playlists from terminal

RadioactiveRadz
Casual Listener
Mac

Re: Commands to play songs and playlists from terminal

RadioactiveRadz
Casual Listener

Re: Commands to play songs and playlists from terminal

mwleeds
Newbie

For me, the command given by olejon worked on my Debian (Jessie) machine but not on one running Fedora 23. For the Fedora computer, here's what worked:

 

qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.OpenUri spotify:track:1WNPappMd13lY5o9POZ4gU

Re: Commands to play songs and playlists from terminal

pictomtr
Newbie

Weirdly enough this works for me for individual tracks for the Fedora solution, but as soon as I attempt to use for an album or playlist it just opens the respective playlist/album and doesn't start playing ala the original OP's problem.

 

Any use of PlayPause just starts the last track that was waiting on Spotify when I opened it. Anyone any idea why this would be?

Re: Commands to play songs and playlists from terminal

olejon
Roadie

@pictomtr wrote:

Weirdly enough this works for me for individual tracks for the Fedora solution, but as soon as I attempt to use for an album or playlist it just opens the respective playlist/album and doesn't start playing ala the original OP's problem.

 

Any use of PlayPause just starts the last track that was waiting on Spotify when I opened it. Anyone any idea why this would be?


 

If you are using the new v 1.0 this is a bug in the D-Bus MPRIS implementation. In fact there are several, like it is now not possible to get PlaybackStatus. No response from Spotify yet. The behaviour has been the same from at least v 0.6 to v 0.9, so why the have broken it now I don't know.

 

Would be nice if some of the Spotify Linux devs could look at this, please!

 

You can downgrade to v 0.9, which shouldn't make you lose any important features. Check out this guide:

 

Remember to read the section below the guide link ("If you have already installed Spotify Beta for Linux...").

 

https://github.com/olejon/spotcommander/wiki/InstallOnFedora#install-the-latest-spotify-stable-versi...

 

SpotCommander - The most elegant, intuitive, feature-rich & universal remote control for Spotify, exclusive for Linux users!

Re: Commands to play songs and playlists from terminal

elwat
Newbie

have you been learning to code since kindergarten? How can you code so well, thats awsome

Re: Commands to play songs and playlists from terminal

idontknoooo
Newbie

That URL command doesn't work.

 

To open an URL: 

qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.OpenUri spotify:album:4m2880jivSbbyEGAKfITCa

SUGGESTED POSTS