Skip to content

oxedinc/Spoti_admin_up

Repository files navigation

CleanShot 2025-09-08 at 02 44 44

✨ Features

  • Playlists 🗂️ — list, search, sort, open, checkbox select and bulk unfollow. Export CSV/JSON.
  • Albums 💿 — list saved albums, filter, open, bulk remove from library, export.
  • Insights 📊 — Top by You (Tracks/Artists: month / 3 months / year), least‑popular likes, not‑recent likes. Bulk like/unlike.
  • Identify 🔍 — load M3U/CSV/folders, match via Spotify/Deezer/iTunes/AcoustID, manual resolver, LRCLIB lyrics, progress bar, export.
  • Settings ⚙️ — Spotify OAuth, API keys, iTunes country, requirements check (✓/✗). Saves to ~/.spoti_admin_up_config.json.

🧭 Quick Start (copy–paste blocks)

Windows (PowerShell)

# 1) Clone
git clone https://github.com/oxedinc/Spoti_admin_up.git
cd Spoti_admin_up

# 2) Create venv & install deps
py -m venv .venv
. .\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
# (Alt) pip install spotipy requests mutagen pyacoustid

# 3) Run
py -m spoti_admin_up

If Activate.ps1 is blocked, allow scripts for this session: Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass.


macOS (Terminal / zsh)

# 1) Clone
git clone https://github.com/oxedinc/Spoti_admin_up.git
cd Spoti_admin_up

# 2) Create venv & install deps
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# (Alt) pip install spotipy requests mutagen pyacoustid

# 3) Run
python -m spoti_admin_up

Linux (bash)

# 1) Clone
git clone https://github.com/oxedinc/Spoti_admin_up.git
cd Spoti_admin_up

# 2) Create venv & install deps
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# (Alt) pip install spotipy requests mutagen pyacoustid

# 3) Run
python -m spoti_admin_up

🔑 First-time Setup (inside the app)

  1. Open the Settings tab.
  2. Paste your Spotify Client ID, Client Secret, and Redirect URI (e.g. http://localhost:8888/callback).
    • The Redirect URI must exactly match one configured in your Spotify Developer app.
  3. Click Save and check Requirements (spotipy, requests, mutagen, fpcalc if using AcoustID).
  4. Go to Playlists and click Iniciar sesión once to authenticate. 🎉

Scopes used:

playlist-read-private playlist-read-collaborative
playlist-modify-public playlist-modify-private
user-library-read user-library-modify
user-top-read user-read-recently-played

🧰 Optional: AcoustID (Chromaprint)

  • Enables audio fingerprint matching for Identify.
  • Install Chromaprint (fpcalc):

Windows (Chocolatey):

choco install chromaprint -y
# Then ensure 'fpcalc' is in PATH: fpcalc -version

macOS (Homebrew):

brew install chromaprint
fpcalc -version

Ubuntu/Debian:

sudo apt-get update && sudo apt-get install -y chromaprint
fpcalc -version
  • Get a free ACOUSTID_API_KEY and enter it in Settings → Gratis / Opcional.

Lyrics via LRCLIB require no key. (Genius token optional.)


📐 ASCII Diagram (high-level)

+------------------------- App (Tkinter) --------------------------+
|  [Identify]  [Playlists]  [Albums]  [Insights]  [Settings]      |
|                                                                 |
| Identify:                                                       |
|  Load (M3U/CSV/Folder) → Analyze → Candidates → Resolve → Save  |
|               ↓                        ↓                        |
|    Providers: Spotify / Deezer / iTunes / AcoustID              |
|               ↓                        ↓                        |
|   Progress Bar + Status Text         Add to Liked / Lyrics      |
|                                                                 |
| Playlists: List → Filter → [✓] select → Unfollow / Export       |
|                                                                 |
| Albums:    List → Filter → [✓] select → Remove / Export         |
|                                                                 |
| Insights:  Top Tracks/Artists | Least-Pop Likes | Not-Recent    |
|            [✓] select → Like / Unlike → Export                  |
|                                                                 |
| Settings:  Spotify OAuth / API Keys / Country / Requirements    |
+-----------------------------------------------------------------+

🧩 Troubleshooting

Windows: delete token & re-run

Remove-Item "$env:USERPROFILE\.spoti_admin_up_token.json" -ErrorAction SilentlyContinue
py -m spoti_admin_up

macOS/Linux: delete token & re-run

rm -f ~/.spoti_admin_up_token.json
python -m spoti_admin_up
  • INVALID_CLIENT: Invalid redirect URI → The Redirect URI in Settings must exactly match your app settings.
  • 403 Insufficient client scope → Add the missing scopes in Settings and re-authenticate (Playlists → Iniciar sesión).
  • AcoustID not working → Ensure fpcalc is installed and ACOUSTID_API_KEY is set in Settings.

🗂️ Project Structure

spoti_admin_up/
├─ __main__.py          # entrypoint: python -m spoti_admin_up
├─ main.py              # bootstraps GUI
├─ gui.py               # Tkinter app: tabs (Identify, Playlists, Albums, Insights, Settings)
├─ spotify_client.py    # lazy-auth Spotify client (Spotipy); bulk helpers
├─ identify.py          # Identify engine (providers, resolver, lyrics, progress)
├─ settings_ui.py       # Settings tab (JSON config + requirements check)
├─ config.py            # settings model, JSON IO, requirement checks
├─ utils.py             # CSV/JSON export helpers
└─ requirements.txt     # Python dependencies

📝 License

MIT — do what you want, just keep the notice. ✌️

Made with ❤️, playlists, and a lot of caffeine. ☕🎶