Skip to content
jmiragzPublic

About

some small utilities to help me with migrating my library off of spotify

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

iPod library utilities

Small Python scripts for preparing a local music library and playlists for an iPod. The scripts are independent; run only the ones you need.

Requirements

  • Python 3.10 or newer.
  • mutagen for organize_library.py and peek_missing_metadata.py: python -m pip install mutagen
  • A Spotify developer app for backup_spotify_playlist_covers.py. Add http://127.0.0.1:8888/callback as its redirect URI. Set SPOTIFY_CLIENT_ID in your environment; no client secret is needed.

Run commands from this directory. Review the settings near the top of each script, especially drive paths, before running it.

Scripts

Script Purpose Input and output
split_spotify_playlists.py Splits a TuneMyMusic Spotify export into one CSV per collection for CSVMusic. Reads My Spotify Library.csv; writes spotify_playlist_csvs/, including a manifest and separate non-track collections.
backup_spotify_playlist_covers.py Uses Spotify OAuth PKCE to download cover images for playlists visible to your account. Writes timestamped backups under spotify_playlist_cover_backups/, with a CSV manifest. Requests private and collaborative playlist read access.
leftovers.py Copies audio from an old iPod backup into the local library and creates a playlist for it. Edit SOURCE for your backup path; writes Library/Mystery iPod Finds/ and Playlists/Mystery iPod Finds.m3u8. Existing destination files with the same names can be overwritten.
make_ipod_classic_og_playlist.py Creates an M3U8 playlist for all supported audio in Library/iPod Classic OG/. Writes Playlists/iPod Classic OG.m3u8.
peek_missing_metadata.py Reports audio files missing artist, album, or title tags. Reads Library/; writes missing_metadata.csv.
organize_library.py Plans a new artist/album library, selects preferred copies of duplicate tracks, and rewrites playlist paths. Reads Library/ and Playlists/; writes to DEST_ROOT only with --apply. Requires mutagen.

Suggested workflow

  1. Place your own music under Library/ and M3U/M3U8 playlists under Playlists/.
  2. Run python peek_missing_metadata.py to inspect missing tags.
  3. Edit DEST_ROOT near the top of organize_library.py to a destination you control. Run python organize_library.py for a dry run and inspect the counts, path examples, and unresolved playlist entries.
  4. Only after reviewing the plan, run python organize_library.py --apply. The destination must be absent or empty; the script copies files and leaves the source library in place. Unresolved playlist entries are preserved and reported.

The Spotify CSV splitter and cover backup are optional separate utilities. To back up covers in PowerShell, set $env:SPOTIFY_CLIENT_ID = "your-client-id" in that session, then run python backup_spotify_playlist_covers.py.

About

some small utilities to help me with migrating my library off of spotify

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages