This script adds the currently playing title in MPV to a user-defined Spotify playlist.
- Python 82.4%
- Lua 17.6%
| LICENSE | ||
| README.md | ||
| readme.png | ||
| requirements.txt | ||
| spotify.lua | ||
| spotify_helper | ||
mpv-add-to-spotify
This project is archived and no longer maintained.
For more details, see Criticism of Spotify on Wikipedia.
This script adds the currently playing title in MPV to a user-defined Spotify playlist. You can use it by pressing the 'P' keybinding or by enabling the autosave feature.
If your radio does not broadcast title, you can use this script along with mpv-radio-title.
Usage
Press P to add current title to your Spotify playlist.
Config
- Edit
spotify.lua
local settings = {
bind_key = "P", -- Prefered key binding
spotify_helper_path = "spotify_helper", -- Path to Spotify Helper
playlist_id = "https://open.spotify.com/playlist/37i9dQZEVXcIrtIexJhQmZ?si=84a21eb7d0ff4efd", -- Right click on playlist > Share > Copy Link to Playlist
autosave = false, -- Autosave to Spotify when title is changing
}
- Create an app on https://developer.spotify.com/dashboard/
- Configure Redirect URIs to
http://localhost:45678/callback
- Configure Redirect URIs to
- Now you can configure the
CLIENT_IDandSECRET_IDvalues inspotify_helper
Install
You will need the python-aiohttp package from your distro.
git clone https://codeberg.org/olivierlm/mpv-add-to-spotify
# Move helper somewhere in your $PATH
cp mpv-add-to-spotify/spotify_helper ~/.local/bin/
cp mpv-add-to-spotify/spotify.lua ~/.config/mpv/scripts/
