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>
This commit is contained in:
27
TASKS.md
27
TASKS.md
@ -11,13 +11,17 @@
|
||||
|
||||
- [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.
|
||||
- [~] 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
|
||||
|
||||
@ -43,13 +47,22 @@
|
||||
via tagging.write_artwork). scripts/audit_artwork.py re-checks coverage.
|
||||
- `.itc` decoder lives in lintunes/itc.py (tests/test_round9.py). -->
|
||||
|
||||
- [ ] **Move data dir** to `/run/media/trav/tummult/music/lintunes/` once trav
|
||||
confirms the real import looks right (re-run import or copy `./data`, update
|
||||
config with `--save-config`). Where the data dir is should be a setting in the preferences of
|
||||
|
||||
- [ ] Run the real import on trav's library and eyeball the result (fixture in
|
||||
`./itunes-test-library/`).
|
||||
- [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,
|
||||
|
||||
Reference in New Issue
Block a user