the-lay / ulauncher-spotify-api

Control Spotify clients on any device with ulauncher
https://ext.ulauncher.io/-/github-the-lay-ulauncher-spotify-api
MIT License
52 stars 2 forks source link
control-spotify spotify-api spotify-features ulauncher ulauncher-extension ulauncher-extensions ulauncher-spotify

ulauncher-spotify-api

ulauncher extension that provides Spotify controls through WebAPI.

Demo gif

Note: some playback features are allowed only for Spotify Premium subscribers (see Troubleshooting below).

Available commands

Commands

Motivation

There's a great Ulauncher extension pywkm/ulauncher-spotify. However, ulauncher-spotify uses dbus to control Spotify, exposing a very limited number of Spotify features to the user.

In contrast, this extension makes use of Spotify's Web API through which it is possible to use almost all Spotify features. The aim is to provide direct access to most features that make sense for a command runner.

Installation

Please use the default way to install ulauncher extensions: Preferences -> Extensions -> Add extension -> https://github.com/the-lay/ulauncher-spotify-api. On the first run, the extension will try to install the dependencies automatically.

For various reasons (pip is not installed, hardened permissions, non-standard installations...) automatic installation can fail, and the Ulauncher will report something along the lines of ModuleNotFoundError: No module named 'spotipy'. In that case, first, make sure you have pip installed: pip -V should show a version. If pip binary is not found, please install it, e.g.: sudo apt install pip3. Next, you have to install python dependencies: pip3 install "spotipy==2.16.1" "requests==2.23.0" and then restart Ulauncher.

In case you have multiple Python environments on your system (PyEnv, Conda etc.), please note that you have to install the dependencies to the default system python that Ulauncher uses. Most likely, this will be the command you want: /usr/bin/python3 -m pip install "spotipy==2.16.1" "requests==2.23.0"

Extension's default keyword is sp. When you use the extension for the first time, you will have to go through OAuth authentication and allow access to your Spotify account. After that, you will be able to use the extension.

Note: if you ever want to revoke extension's access, you can do so in the Apps tab of your Spotify settings.

Currently implemented

Feature roadmap

There might be more TODO in github issues.

If you have any suggestions or feel that something is missing, please open a new issue.

Troubleshooting