Files
lintunes/TASKS.md
trav 2c5b5a575f Store track paths relative to the data dir for multi-machine sync
The library is going live as the canonical store, synced to a second machine
via Syncthing. Track locations were stored absolute and only remapped at import,
so on a second machine (where Syncthing mounts the folder at a different path)
every location would break.

- lintunes/paths.py: to_relative/to_absolute. Locations are stored relative to
  the data dir and resolved back on load, applied only at the json_storage
  boundary (save_tracks/load_library). Track.location stays absolute in memory,
  so the player, tagging, and art code are unchanged. The data dir and the music
  move together inside one synced tree, so paths resolve wherever it's mounted —
  no per-machine music_root config. Absolute paths in older library.json files
  still load (back-compat).
- tests/test_round15.py: helper round-trips, back-compat, and a machine-2
  scenario (save under root A, load the copied tree under root B).
- TASKS.md/tasks-done.md: mark the data-dir move + real import done; log the
  benign exit-time Qt/FFmpeg teardown segfault.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 16:43:57 -04:00

73 lines
5.3 KiB
Markdown

# LinTunes — master task list
## Open / future
- [x] confirm last fm works
- [x] do do a volume slider, this can some space between the visualizer and the timeline.
- [x] I'd like in the preferences to have a colors adjustment for each area setting: background, round-rec of buttons, the (currently white) behind the track/artist/album text, the color of that text itself, and the color of the gray of the stripes in the tracklisting. Each of those should have a slider from black to white that appears immediately so the user can tweak it to their liking.
- [x] visualizer should have more discrete mode that's a light gray on light gray
- [~] we need to be able to make smart playlists. They should also be properly imported from itunes. We need all the fields that itunes 12 is able to work with when creating a smart playlist. This is a complicated feature! We also need to be able to edit the criteria of a smart playlist once it is created. Smart playlists should have a little Rotated Floral Heart Bullet (❧) to the left of their title in the playlist list on the left. _(Round 14 — Phase 1 done: full iTunes import (incl. nested groups, which parse + evaluate) and a flat-rule editor. **Phase 2 TODO:** nested-group editing UI in the dialog — until then, imported nested playlists are shown read-only. See tasks-done.md.)_
- [x] the ability to not just copy/paste a song but also to ctrl-x cut a song from one space and ctrl-v paste it somewhere else. AND when pasting a song(s) it should paste above the currently selected track. That's where it pastes to, not to the end of the playlist.
- [x] if the user is dragging a track around and they drag above the top of the track list, the track list should scroll up. Same if they hover the track below the track list at the bottom it scrolls down. The track list should scroll in the direction the user is hovering the track. This helps the user move a track to a place in a playlist that isn't currently seen.
- [ ] the app should be a little more agressive about comandeering the play/pause button from other media playing on the system. If I was playing a youtube video and that was associated with play/pause, but it's been hours since I played it, and I started playing music in lintunes, I would expect the play/pause button to pause the lintunes music when I hit it— not also start playing a youtube video, you know what I mean?
- [ ] Minor: LinTunes segfaults during Qt-Multimedia/FFmpeg pipeline teardown on
app **exit** (fires after the GUI is gone — cosmetic, no data risk since writes
are atomic). Tidy the shutdown so the media objects are released cleanly.
## when we're ready to go live
- [ ] (`tagging.read_embedded_artwork`); it is NOT stored in library.json.
<!-- Context added by Claude (Opus 4.8), 2026-06-19 — the "migrate 100% of my
artwork" question is now ANSWERED & TOOLED, only the grid-view feature remains:
- lintunes shows art from embedded tags only; the importer never touched art.
- Audited the live library vs iTunes' XML "Artwork Count" + the on-disk
`Album Artwork/` cache (scripts/audit_artwork.py, read-only). Result:
13,571 tracks already have embedded art; 790 more are recoverable by
copying an album-mate's embedded art; 0 cache-only and 0 hard residue;
7,015 genuinely have no art; 6 files missing on disk.
=> after recovery, 100% of art-bearing tracks (14,361/14,361) are covered.
- iTunes' `.itc` cache holds NO art that we can't already recover: `Cache/` is
keyed by track persistent_id but only mirrors already-embedded art (0 extra);
`Download/Store` art uses an opaque id, but every track it would cover already
has art via embed or album-propagation, so residue is 0. No `.itl` parsing or
online refetch needed.
- TO FINISH MIGRATION (before/after the live import): run
python3 scripts/recover_artwork.py --data-dir <data> --write
(defaults to --dry-run; embeds the 790 album-propagated covers into the files
via tagging.write_artwork). scripts/audit_artwork.py re-checks coverage.
- `.itc` decoder lives in lintunes/itc.py (tests/test_round9.py). -->
- [x] **Move data dir** to `/run/media/trav/tummult/music/lintunes/` — done
2026-07-01 (fresh import written there, config saved with `--save-config`).
Track paths are now stored **relative to the data dir** (`lintunes/paths.py`,
applied at the `json_storage` boundary) so the Syncthing-shared library is
portable to the second machine regardless of its mount point. See tasks-done.md
Round 15.
- [ ] Make the data dir location a **preference** (currently only settable via
`--data-dir` / `--save-config`).
- [x] Run the real import on trav's library — done 2026-07-01: 21,382 tracks,
462 playlists + 21 folders, 18 smart playlists (3 kept as snapshot), 5 missing
files, 1,324 case/unicode path fixes. Imported to the synced data dir; old
`./data` kept as a rollback backup until machine 2 is confirmed.
Artwork migration still to run against the live library (before relying on it):
1. `python3 scripts/audit_artwork.py --data-dir <data> --xml "<iTunes XML>"`
(read-only) to re-confirm the counts on the freshly-imported library.
2. `python3 scripts/recover_artwork.py --data-dir <data> --dry-run`, review,
then re-run with `--write` to embed the covers into the files.