All Projects → chiply → spot4e

chiply / spot4e

Licence: MIT License
Emacs client for Spotify search and playback using helm

Programming Languages

emacs lisp
2029 projects

Projects that are alternatives of or similar to spot4e

playlists
💽 An archive of my Spotify playlists.
Stars: ✭ 34 (-17.07%)
Mutual labels:  spotify-api
spotify-clone
🎶🎶Simple Spotify Clone using ReactJs. Here we are using the Official Spotify API to make calls. Here we can able to login, logout and gear the music.
Stars: ✭ 21 (-48.78%)
Mutual labels:  spotify-api
react-redux-spotify
React + Redux + Spotify web api boilerplate project
Stars: ✭ 14 (-65.85%)
Mutual labels:  spotify-api
spotify-connect-ws
A Socket.IO plugin for interfacing with Spotify's Connect API using WebSockets.
Stars: ✭ 61 (+48.78%)
Mutual labels:  spotify-api
graphql-spotify
GraphQL Schema And Resolvers For Spotify Web API
Stars: ✭ 55 (+34.15%)
Mutual labels:  spotify-api
website
My personal website and blog. Made with Nuxt.js and WindiCSS.
Stars: ✭ 19 (-53.66%)
Mutual labels:  spotify-api
spotify-release-gun
A python tool that informs about new releases of the artists you follow.
Stars: ✭ 17 (-58.54%)
Mutual labels:  spotify-api
discoverify
Free Spotify add-on that automatically generates a personalized "Discover Daily" playlist, filled with recommendations based on your listening history.
Stars: ✭ 40 (-2.44%)
Mutual labels:  spotify-api
spotify-lyrics-viewer
View the lyrics of the current playing Spotify song in your browser
Stars: ✭ 20 (-51.22%)
Mutual labels:  spotify-api
remixr
Discover new music based on the Spotify playlists you know and love!
Stars: ✭ 37 (-9.76%)
Mutual labels:  spotify-api
springtunes
Control your Spotify client remotely from your browser
Stars: ✭ 19 (-53.66%)
Mutual labels:  spotify-api
spotify-stats
🎧 Your spotify profile's top artists and tracks with charts and playlist creator.
Stars: ✭ 73 (+78.05%)
Mutual labels:  spotify-api
FCommunity
multi Checkers (Hma/Hulu/Spotify/Call of duty/Instagram/smtp2go/VyprVpn) in One Tool Named FCommunity
Stars: ✭ 26 (-36.59%)
Mutual labels:  spotify-api
spotifytrack
A personal homepage showing users' top songs and artists, providing a shareable link that they can use to show it off to friends.
Stars: ✭ 48 (+17.07%)
Mutual labels:  spotify-api
spotify-auth-code-example-vue
VueJS boilerplate app with Spotify API authentication and data fetching.
Stars: ✭ 12 (-70.73%)
Mutual labels:  spotify-api
SpotMusicGen
A Program that creates a Spotify playlist from a YouTube Playlist
Stars: ✭ 47 (+14.63%)
Mutual labels:  spotify-api
spotify-audio-features-data-experiment
Using Spotify’s audio features API, data, and machine learning, I investigated how boring my saved songs are.
Stars: ✭ 56 (+36.59%)
Mutual labels:  spotify-api
Spotify-Cards-API
🚀 Unofficial Spotify PromoCards API
Stars: ✭ 13 (-68.29%)
Mutual labels:  spotify-api
PlaylistPolice
Allows you to whitelist Spotify users for your collaborative playlists
Stars: ✭ 33 (-19.51%)
Mutual labels:  spotify-api
spotify-true-random
🔀 An application for unbiased truly random playlist and library shuffling with Spotify.
Stars: ✭ 51 (+24.39%)
Mutual labels:  spotify-api

spot4e

An emacs helm interface for searching Spotify and controlling playback (on premium).

Of note, spot4e controls Spotify via the Spotify API, not dbus. This means you can control Spotify playback on whichever device Spotify is currently active. For example, you can control Spotify playback on your iPhone or Google Home if you wish. You do not have to have Spotify open on the computer running emacs.

This feature also means that spot4e should work as-is on most operating systems.

Installation

Dependencies

spot4e depends upon lisp packages json, url, and helm to function properly.

Also, this app is NOT a backdoor to Spotify. You need to have a premium account to use playback features!

Installation instructions

This package is not yet on MELPA.

To install, simply download the spot4e.el file and install however you like.

For example, clone the project to whichever location you prefer, and add the directory to your load path. I recommend placing the following to your init file:

(add-to-list 'load-path "/path/to/spot4e")

Initial setup

Because spot4e controls a given user’s Spotify playback, it requires each user allow spot4e to access user data. Each user must authorize spot4e through Spotify’s Authorization Code Flow, so there is some setup required:

Step 1:

To credential the app, run the interactive function spot4e-authorize:

M-x spot4e-authorize

This will open a login page in your browser.

Step 2

Log in (or click ok if you are already logged in). You will be redirected to Spotify’s home page, where the URL contains your authorization code:

https://www.spotify.com/us/?code=AUTH_CODE_HERE

Step 3

Copy the this code and paste into the emacs minibuffer prompt “Enter code from URL” and press enter

Step 4

This authorization process has given you a refresh token, stored in spot4e-refresh-token, which you will want to save for future sessions.

I recommend storing this token in your emacs config file:

(setq spot4e-refresh-token "REFRESH_TOKEN_HERE")

Note: you can get your refresh token by simply typing spot4e-refresh-token into any buffer, placing your cursor immediately after the variable, and pressing C-u C-x C-e. This evaluates the variable and prints the output at point.

Step 5

This refresh token does not expire and will be good for future sessions. The access-token, however, does expire every hour, so I recommend refreshing it periodically with the spot4e-refresh function. I recommend adding the following to your config file as well:

(run-with-timer 0 (* 60 59) 'spot4e-refresh)

Usage

To reiterate from the summary, spot4e controls user’s Spotify playback through the Spotify API. You must have an active Spotify session for spot4e to trigger playback on the respective device.

Playback control

You can control Spotify playback with the following.

spot4e-message-currently-playingmessage current track in minibuffer
spot4e-player-playsend play to Spotify playback
spot4e-player-pausesend pause to Spotify playback
spot4e-player-nextsend next to Spotify playback
spot4e-player-previoussend previous to Spotify playback

Search

Search track by album-, artist-, or track name

To start searching for tracks:

M-x spot4e-search-tracks

and begin searching for tracks.

Of note, this interfaces with the tracks search endpoint which allows you to search for tracks by artist, album, and track name.

Once the items appear, you can go to next an previous with either the C-n and C-p commands, respectively or the <down> and <up> keys, respectively.

To play a track, simply press Enter. By default, the track plays in the context of the album in which it appears, otherwise playback stops after the song is finished.

Search for album by album- or artist- name

To start searching for albums:

M-x spot4e-search-albums

and begin searching for albums

Navigate through tracks as usual and press enter to see album tracks. Press enter on an album track to play the track. You can navigate back to search-albums with <f2>.

Search for artist by artist- name

To start searching for artists:

M-x spot4e-search-artists

and begin searching for artists

Navigate through artists as usual and press enter to see artist albums. Press enter on an artist album to see album tracks. You can navigate back to search-albums with <f2>.

Press enter on album-track to play the track.

Browse

Browse category –> playlist

To start the category browser:

M-x spot4e-helm-search-categories

And browse categories. Press enter on a category to see that category’s playlists. Press enter on a playlist to see a category’s tracks. Press enter on a track to play the track.

A crude model for this browse interface is:

category<–>playlist<–>track

Note you can ‘go back’, let’s say from playlists to category, by pressing <f2>. This makes browsing more natural - similar to what you might experience in the Spotify app.

Browse new releases by album

To start the new releases browser:

M-x spot4e-helm-search-new-releases

And browse new releases. Note these are albums. Press enter on a new release to see the tracks (note most of these new releases will be singles, so there may only be one or two tracks). Press enter on a track to play the track. Go back to new releases with <f2>.

Browse featured-playlists

To start browsing featured playlists:

M-x spot4e-helm-search-featured-playlists

And browse featured playlists. Press enter on a playlist to view it’s tracks. Press enter on a track to play the track or <f2> to go back to playlists.

Browse user-playlists

To start browsing user owned and followed playlists:

M-x spot4e-helm-search-user-playlists

And browse user followed playlists. Press enter on a playlist to view it’s tracks. Press enter on a track to play the track or <f2> to go back to playlists.

Browse user-artists

To start browsing user followed artists:

M-x spot4e-helm-search-user-artists

Navigate through artists as usual and press enter to see artist albums. Press enter on an artist album to see album tracks. You can navigate back to search-albums with <f2>.

Press enter on album-track to play the track.

Browse user-tracks

To start browsing user saved tracks:

M-x spot4e-helm-search-user-tracks

and browse user-saved tracks.

Press enter on a track to play the track.

Browse recommended tracks based on currently playing track

Assuming a track is playing, start the recommended track browser with:

M-x spot4e-helm-search-recommendations-track

And browse recommendations. Of note, if done repeatedly, the recommended track list varies slightly, as I imagine there is some randomization that occurs in Spotify’s recommendation engine.

Of note you can also get recommendations from the spot4e-helm-search-tracks interface by pressing <f2>. This way you can get recommendations based upon specific songs you have in

User data

Save tracks

To save a track:

spot4e-save.

This will then appear in your saved tracks on Spotify (can access these with spot4e-helm-search-user-tracks). Note that you can also save tracks from the spot4e-helm-search-tracks interface with spot4e-save.

Credits

This package was primarily inspired by Kris Jenkins’s helm-spotify, with the main differences being support for authentication and control of playback on third-party devices.

Credit is also due to the developers of the Spotify API, whose excellent design made the development of this app straightforward.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].