bossbadi / spotify

Easily sync your Spotify playlists to a local folder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spotify

Easily sync your Spotify playlists to a local folder

Setup

Install the requirements

pip install -r requirements.txt

Put your Spotify playlist urls in playlists.json in the following format

{
  "PLAYLIST_NAME": "PLAYLIST_URL",
  "PLAYLIST_NAME_2": "PLAYLIST_URL_2",
  "PLAYLIST_NAME_3": "..."
}

General usage

Sync all playlists from playlists.json

python main.py

Sync specific playlists from playlists.json.

python main.py PLAYLIST_NAME PLAYLIST_NAME_2 ...

If there are spaces in the playlist name, put the name in quotes

python main.py "PLAYLIST NAME" "PLAYLIST NAME 2" ...

Android (Termux)

For Android users, download Termux (preferably from F-Droid) and run the following commands:

# setup storage
yes | termux-setup-storage

# install dependencies
pkg update
pkg install -y python
pkg install -y ffmpeg

# download repository
git clone "https://github.com/bossbadi/spotify" ~/storage/music/
cd ~/storage/music/
pip install -r requirements.txt

# activate scripts
mkdir -p ~/.local/bin/
cp bin/* ~/.local/bin/
chmod -R +x ~/.local/bin/
echo 'export PATH=/data/data/com.termux/files/home/.local/bin:$PATH' >> ~/.bashrc

cd

Then, whenever you want to sync your playlists to your phone, just open Termux and run one of the following commands:

./spotify
./spotify PLAYLIST_NAME PLAYLIST_NAME_2 ...
./spotify "PLAYLIST NAME" "PLAYLIST NAME 2" ...

About

Easily sync your Spotify playlists to a local folder


Languages

Language:Python 59.5%Language:Shell 40.5%