icon Connectr icon

OSX/Linux Build Status Windows Build Status Crates.io Version

#

A super lightweight Spotify controller.

#

Connectr is a tiny application that lets you quickly and easily see – or change – what's playing on your Spotify account.

It's compatible with anything that supports Spotify Connect: computers, mobiles, speakers, TVs, Playstations, etc.

NOTE: Spotify Premium is required to use Spotify's remote control features. Free accounts do not work.

It runs in the Mac menu bar (top right corner) or Windows system tray (bottom right corner...), and the Mac Touch Bar (the fancy touchscreen on new Macbook keyboards). It's just a little icon that pops up the controls when you need them, and hides away when you don't. Or just hover over it to see what's currently playing.

What it can do:

Most importantly, it maintains a tiny memory footprint while running. ~10MB on a Mac, compared to 300-1000MB for the Spotify desktop app. You shouldn't need to buy extra RAM just to monitor what's playing on your speakers.

The alarm clock and scrobbling features expect Connectr to run on an always-on server. If you want to run it on a headless Linux machine, you can configure it on a local machine first and then move the ~/.connectr.ini to your server.

For developers: the API for communicating with the Spotify backend is provided as a Rust library, available as a Cargo crate. Connectr exposes the official Spotify 'Player' Web API for controlling Spotify Connect devices.

NOTE: Connectr is not an audio playback tool; it's just a remote control. Spotify has not publicly released a library for implementing audio playback with Spotify Connect support. There's a reverse engineering effort, coincidentally also in Rust, at librespot. The librespot + connectr combo gives you a full Spotify playback experience in ~15MB of RAM. It's the most resource-efficient way to listen to Spotify.

NOTE: Connectr is not developed by Spotify and has nothing to do with their company.

Download

Binary releases are provided as a convenience. Building from source is preferred.

Connectr v1.0.1

Mac OS X (64-bit, md5: 36425c450804d2cb7f34dcc65d19d6b8)

OLD RELEASE: Connectr v0.2.0

Windows 10 (64-bit, md5: 1745ecb67bd5ef0822eeabd96d98dcde)

Screenshots

#

Mac OS X

Windows 10

Macbook Touch Bar

#

Build Instructions

You need to download Rust to build.

$ git clone https://github.com/mrmekon/connectr.git $ cd connectr $ cargo run

Usage / Help

On first launch, Connectr will open your web browser to a self-configuration page, and save its configuration to your system home directory. The configuration page will walk you through creating the necessary Spotify developer application.

Spotify Developer Application configuration

On the first launch, Connectr will guide you through setting up a Spotify developer application. If you want to do it manually instead, or if something goes wrong, here are the instructions:

Mac Touch Bar interface

Setup

Controls

Configuration file (connectr.ini) format

Note: connectr uses ~/.connectr.ini if it exists. If it does not exist, connectr will fallback to trying connectr.ini in the directory it is run from. A template is provided in connectr.ini.in.

The config file is generated by a graphical web configuration the first time Connectr is launched, and can be reconfigured by selecting Reconfigure Connectr from the menu. It is not necessary to write connectr.ini yourself. The following documentation is just for reference.

connectr's configuration is read from a regular INI file with these sections:

[connectr]

[application]

[presets]

One preset per line, in either format:

Where:

Example:

Make a preset called Bakesale that plays a Sebadoh album when selected, and saves my favorite tracks from that album to a private playlist:

Bakesale = spotify:album:70XjdLKH7HHsFVWoQipP0T,spotify:user:mrmekon:playlist:4aqg0RkXSxknWvIXARV7or

[alarms]

Note: This can and should be configured through the graphical web interface instead of by editing directly. Select Edit Alarms from the Connectr menu to launch the graphical interface.

Up to five alarm clock entries, which specify a time, device, playlist to play, and which days to repeat the alarm on.

Format:

alarm<i> = <hour>:<minute>,<repeat>,<Spotify URI>,<Device ID>

note: Connectr must be running and connected to the internet at the scheduled alarm time. The target device must also be running and logged in with your Spotify account. This means the alarm functionality is most useful when running on an always-on machine such as a home media server or a VPS. You can run Connectr on a headless server by configuring it on a desktop machine, and copying the ~/.connectr.ini config to the server.

[lastfm]

Optional configuration to have Connectr scrobble track plays to the Last.fm scrobbling service. This requires a free Last.fm account and free Last.fm developer API tokens.

note: This MUST be configured through the graphical web interface. The web interface requests your Last.fm username and password, and the password is swapped out for a session key before saving to the config file. It is not possible to specify a password in the config file, so you cannot enable Last.fm scrobbling without the GUI. Once enabled, a valid Last.fm configuration can be transferred to other machines.

note: Like the alarm feature, scrobbling requires Connectr to always be running. This means it should be run from an always-on computer, such as a home media server or a VPS. You can configure it on a regular machine first, and then copy the ¨/.connectr.ini file to your always-on server.

There are options to ignore tracks played on phones/tablets or computers, in case you want to have the official Spotify clients handle scrobbling from those devices. This is beneficial, especially for mobiles, because Spotify can scrobble tracks played while offline.

[tokens]

note: This section is auto-generated and auto-updated at runtime. You can leave it empty if you make your own config file.

Example connectr.ini

``` [connectr] port=5432

[application] secret=xxxxxyyyyyaaaaabbbbbcccccddddd client_id=xXxXxyYyYynNnNnNmMmMmMpPpPpP

[presets] Discover Weekly=spotify:user:spotify:playlist:37i9dQZEVXcOmDhsenkuCu Edge Detector=spotify:user:mrmekon:playlist:4SKkpDbZwNGklpIILmEZAg Play Today=spotify:user:mrmekon:playlist:4c8eKK6kKrcdt1HToEX7Jc

[tokens] version=1 access=this-is-autogenerated refresh=this-is-also-autogenerated expire=1492766270

[lastfm] enabled=true key=aaaaabbbbbbccccccddddddeeeeee secret=ffffffgggggghhhhhhhiiiiiijjjjjj sessionkey=kkkkkkllllllmmmmmmnnnnnooooooppppp username=MyGloriousUsername ignorephone=true ignore_pc=false

[alarms] alarm1=08:00,weekdays,spotify:user:mrmekon:playlist:1BayoBGuBA5HhF0ZuYw2sN,1267eba791c19740744eb5c41a5165ce6691fb9b ```

Feature Progress

| Feature | OS X | Windows | Linux | | --- | --- | --- | --- | | | | | | API | | Fetch list of devices |

| | | | Fetch current playback information | | | | | Transfer playback to device | | | | | Start new playback on device | | | | | Pause/Resume | | | | | Skip next/previous | | | | | Seek in track | | | | | Change volume | | | | | Change repeat state | | | | | Change shuffle state | | | | | Alarm clock | | | | | Last.fm Scrobbling | | | | | Fetch album art | | | | | | | | | UI | | Display current track | | | | | Current track in tooltip | | | | | Playback controls | | | | | Device selection | | | | | Volume control | | | | | Presets | | | | | Save current track to playlist | | | | | | | | | System | | Persistent configuration | | | | | System logging | | | |

Notable Dependencies