Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/olivierlemoal/mpv-spotify-script
https://github.com/olivierlemoal/mpv-spotify-script
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/olivierlemoal/mpv-spotify-script
- Owner: olivierlemoal
- License: mit
- Created: 2019-10-09T22:24:23.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-22T22:30:44.000Z (over 1 year ago)
- Last Synced: 2024-06-30T13:39:47.385Z (5 months ago)
- Language: Python
- Size: 41 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mpv - spotify - Add current playing title to an user defined Spotify playlist. (Streaming)
README
# mpv Spotify
This script add current playing title in MPV to a user-defined Spotify playlist.
You can use it pressing P keybinding, or use autosave feature.![example](/readme.png)
If your radio does not broadcast title, you can use this script along with [mpv-radio-title-script](https://github.com/olivierlemoal/mpv-radio-title-script/).
## Usage
Press P to add current title to your Spotify playlist.
## Config
Edit `spotify.lua`
```lua
local settings = {
spotify_helper_path = "spotify_helper", -- Path to Spotify Helper
playlist_id = "spotify:playlist:0OlQjrqrHIJq7cOED2Qm7H", -- Right click on playlist > Share > Copy Spotify URI
autosave = false, -- Autosave to Spotify when title is changing
}
```Edit `spotify_helper`
```python
# Create an app on https://developer.spotify.com/dashboard/
# Configure CLIENT_ID / SECRET_ID in spotify_helper
# Configure callback to http://localhost:{PORT_CALLBACK}/callback on Spotify dashboardCLIENT_ID = ""
SECRET_ID = ""
PORT_CALLBACK = 45678
```## Install
```bash
git clone https://github.com/olivierlemoal/mpv-spotify-script
# Move helper somewhere in your $PATH
mv mpv-spotify-script/spotify_helper ~/.local/bin/
mv mpv-spotify-script/spotify.lua ~/.config/mpv/script
python3 -m pip install --user -r mpv-spotify-script/requirements.txt
```