spop is a Spotify client that works as a daemon (similar to the famous MPD). It is designed to be as simple and straightforward as possible: run it, control it with your keyboard and a few scripts, and just forget about it.
Right now, several plugins are available:
Install libspotify (preferably using your favorite package manager)
Download spop's source code:
git clone git://github.com/Schnouki/spop.git
Prepare your configuration file:
mkdir -p ~/.config/spop
cp spop/spopd.conf.sample ~/.config/spop/spopd.conf
nano ~/.config/spop/spopd.conf
Compile and run spop:
cd spop
./build_and_run -fv
Connect to the daemon and issue some commands:
telnet localhost 6602
If you want something more GUI-like, you can use dspop
, which uses either
dmenu or rofi:
./dspop/dspop
Or, on Linux, you can enable the mpris2
plugin in the configuration file
and use the media controls integrated with some desktop environments.
If you want a really nice web interface, have a look at spop-web by Xemle.
If you want to install spop somewhere on your system, do the following steps:
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/where/to/install ..
make
sudo make install
Add Mopidy APT repository for libspotify
from https://github.com/mopidy/libspotify-deb
:
wget -q -O - http://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
echo -e "deb http://apt.mopidy.com/ stable main contrib non-free\ndeb-src http://apt.mopidy.com/ stable main contrib non-free" | sudo tee /etc/apt/sources.list.d/mopidy.list
sudo apt-get update
Install required libraries via apt-get
:
sudo apt-get install libjson-glib-dev libao-dev libdbus-glib-1-dev libnotify-dev libsoup2.4-dev libsox-dev libspotify-dev
Install libspotify with Homebrew:
brew install https://raw.github.com/mopidy/homebrew-mopidy/master/libspotify.rb
At the moment, spop can not modify your playlists, so you will have to use the official Spotify client to manage them.
Except for that, the following commands are available:
help
: list all available commandsls
: list all your playlistsls pl
: list the contents of playlist number pl
qls
: list the contents of the queueqclear
: clear the contents of the queueqrm tr
: remove track number tr
from the queueqrm tr1 tr2
: remove tracks tr1
to tr2
from the queueadd pl
: add playlist number pl
to the queueadd pl tr
: add track number tr
from playlist number pl
to the queueplay pl
: replace the contents of the queue with playlist pl
and start
playingplay pl tr
: replace the contents of the queue with track tr
from playlist
pl
and start playinguinfo uri
: display information about the given Spotify URIuadd uri
: add the given Spotify URI to the queue (playlist, track or album
only)uplay uri
: replace the contents of the queue with the given Spotify URI
(playlist, track or album only) and start playinguimage uri
: get the cover image for given uri (base64-encoded JPEG image).
Uri must be an track or album uri.uimage uri size
: get the cover image for given uri (base64-encoded JPEG
image). Uri must be an track or album uri. Use 0 for normal size (300px), 1
for small size (64px) and 2 for large size (640px).search query
: perform a search with the given queryplay
: start playing from the queuetoggle
or pause
: toggle pause modestop
: stop playbackseek pos
: go to position pos
(in milliseconds) in the current tracknext
: switch to the next track in the queueprev
: switch to the previous track in the queuegoto tr
: switch to track number tr
in the queuerepeat
: toggle repeat modeshuffle
: toggle shuffle modestatus
: display informations about the queue, the current track, etc.idle
: wait for something to change (pause, switch to other track, new track
in queue...), then display status
. Mostly useful in notification scripts.notify
: unlock all the currently idle sessions, just like if something had
changed.image
: get the cover image for the current track (base64-encoded JPEG image).offline-status
: display informations about the current status of the offline
cache (number of offline playlists, sync status...).offline-toggle pl
: toggle offline mode for playlist number pl
.star
: toggle the "starred" status of the current trackustar uri val
: set the "starred" status of all the tracks in the given URI
(playlist, track or album) to val
(0 or 1)bye
: close the connection to the spop daemonquit
: exit spopThis doc is probably lacking a gazillion useful informations, so feel free to ask me if you have any question regarding spop!