Skip to main content

MPRIS2 interface for Spotify Connect

Project description

SpotPRIS2

Control Spotify Connect devices using MPRIS2


This software provides an MPRIS2 interface for Spotify Connect. It is more complete than the MPRIS2 interface built into the Spotify Linux client.
In addition it can be used to control remote Spotify Connect devices (Like spotifyd running on a Raspberry Pi) from your PC.

This software is still in development. Some things might not work as expected.

Installation

  • Arch Linux: Install from AUR
    yay -S python-spotpris2
  • Other distributions: Install using pip
    pip install spotPRIS2

Then just run spotpris2.

Options

  -h, --help            show this help message and exit
  -d DEVICE [DEVICE ...], --devices DEVICE [DEVICE ...]
                        Only create interfaces for the listed devices
  -i DEVICE [DEVICE ...], --ignore DEVICE [DEVICE ...]
                        Ignore the listed devices
  -a, --auto            Automatically control the active device
  -l [{name,id}], --list [{name,id}]
                        List available devices and exit

In normal mode SpotPRIS2 creates one MPRIS2 interface for each Spotify Connect device connected to your account.

You can use --devices to only create interfaces for specified devices or --ignore to create interfaces for all but the specified devices. Devices can be specified either by their name or their ID.
With --auto only one interface gets created. It will always control the currently active device.

--list lists the names of all available devices. Use --list=id to list their IDs instead.

Known problems

  1. Podcasts, Radios, etc. aren't supported
    This is a limitation of the Spotify Web API. There's currently nothing I can do about it.
  2. The MPRIS2 interface only shows up when something is playing
    If you are running SpotPRIS2 in auto mode this is intended. There is no way for SpotPRIS2 to know which device you want to control, so we don't offer any interface. You can use normal mode if you want to be able to start playback using MPRIS2.

Systemd

To use SpotPRIS2 with systemd, the provided unit file (contrib/spotpris2.service) should be copied into /usr/lib/systemd/user.


This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with Spotify AB, or any of its subsidiaries or its affiliates.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SpotPRIS2-0.4.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

SpotPRIS2-0.4.1-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file SpotPRIS2-0.4.1.tar.gz.

File metadata

  • Download URL: SpotPRIS2-0.4.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

File hashes

Hashes for SpotPRIS2-0.4.1.tar.gz
Algorithm Hash digest
SHA256 f21fa46b66848d1e5c0370f71a62f0b51cbb0afdecf756594bc31e2e8022fdf0
MD5 93b69ce9cc02bc92133a69ff14ec6b2d
BLAKE2b-256 8c8d6e06d7039c94bf51d846e5a67d5ee50b848be83dc5faeaeb84357e07fbc5

See more details on using hashes here.

File details

Details for the file SpotPRIS2-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: SpotPRIS2-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

File hashes

Hashes for SpotPRIS2-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2895607d61ddd26490001c0aea6f2db790a8f26761f5dd0dba5a32b89c9c5e1d
MD5 2e1a0f9dce40e49dd56667b44552d33d
BLAKE2b-256 d8c9cbb31357ac9a153bff4225852bd2bc784ddb2aa113c18776013cf5502ce0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page