No description
- Shell 50.6%
- Python 49.4%
Previously it always showed 'Sync complete' and ejected even on failure (e.g. the TCC EPERM when run as a background launchd agent). Now a failure shows a FAILED notification and leaves the volume mounted. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| mac-sync-kit | ||
| .gitignore | ||
| BUILD.md | ||
| CONTEXT.md | ||
| ipod-sync.py | ||
| make-kit.sh | ||
| README.md | ||
ipod-dap-sync
Sync a Navidrome/Subsonic playlist onto a Rockbox iPod over USB. The iPod's
/Music is made to match the playlist exactly (downloads new tracks, deletes
removed ones), and a Rockbox .m3u8 is written. Pure-stdlib Python — no deps.
Usage
# 1. stash the Navidrome password privately (chmod 600) — NOT via any logged shell:
read -rs PW && printf '%s' "$PW" > ~/ipod-rockbox/.dj-pass && chmod 600 ~/ipod-rockbox/.dj-pass && unset PW
# 2. mount the iPod's FAT32 partition, then sync:
python3 ipod-sync.py \
--server http://10.0.50.83:4533 \ # LAN; or https://music.janovitch.com remotely
--user dj --playlist iPod \
--mount /run/media/aj/IPOD
# preview the playlist's tracks without downloading:
python3 ipod-sync.py --server ... --user dj --playlist iPod --mount /run/media/aj/IPOD --list
Password resolution: $SUBSONIC_PASSWORD, else --pass-file (default ~/ipod-rockbox/.dj-pass).
⚠️ Never poke the iPod while it's writing
Do not run du/find/ls on the mounted iPod during a sync — the old iPod USB
bridge wedges into an unkillable D-state (only a physical unplug recovers it).
Watch progress via /proc/<pid>/io (write_bytes) instead.
Notes
- Sustained multi-file writes through the iPod bridge are slow (~0.5 MB/s) — the first full load is slow; subsequent deltas (a few added/removed tracks) are quick.
- Paths are sanitized for FAT32 (
: / * ? " < > |→_).
TODO
- macOS
.commandwrapper +launchdauto-run on iPod plug-in (Dennis's MacBook Air). - Completion notification (
osascript) + auto-eject → "✅ synced, safe to unplug."