Import existing LinTunes project

Snapshot of the existing codebase before working through the TASKS.md
backlog. Real library data (data/) and the iTunes import fixture
(itunes-test-library/) are gitignored.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-26 21:12:01 -04:00
commit f6d35fa594
70 changed files with 8992 additions and 0 deletions

102
tasks-done.md Normal file
View File

@ -0,0 +1,102 @@
## Done
All four implemented in Round 8 (2026-06-19); see tests/test_round8.py.
- [x] the ability to right click on any track and within the right-click menu that comes up there's an item that says "show in playlist..." with a right arrow. Hover that and you get a list of all the playlists that that track appears in. Select a playlist and the app jumps to that playlist and highlights the first instance of that song in that playlist.
- [x] ability to edit the ID3 tags of multiple files at once and have it intelligently only modify only the id3 tags that the files share. Say we're editing all songs in an albumb: the song title isn't editable because it isn't the same between the tracks, but the album title would show and the artist. So we could make those changes to all songs at once. _(iTunes-style: differing fields show a "Mixed" placeholder but stay editable; only fields you actually touch are written to all selected tracks.)_
- [x] search, we need search. It only needs to appear in the library view. This should be a text box that takes up a third of that empty horizontal space between the tracks view and the top control panel. It should be a textbox that has in very light gray text that says "search". When you click into it that the "search" text disappears. As soon as you start typing it starts filtering the music. This should be compatible with the browser columns so the browser columns still show genres, artists and albums that match the search term. The search should search all fields for the search term(s). I could see this being really slow having to search all fields of all tracks at every keypress. So we can pause between key-presses if we want. So it's a search but really more like a filter. _(250 ms debounce.)_
- [x] I want support for custom start and end times of tracks like itunes has. We need to be able to import this data from how it's stored in the itunes library and we need to be able to respect it during playback. There should also be fields in the 'get info' screen that allows us to turn custom start/end times of the track on and off and set the value of how far into the song it starts/ends. This is a feature in itunes we're implementing. _(Import was already wired; added Get Info fields + playback seek-to-start/stop-at-stop. Stored in library JSON only — no standard ID3 frame, same as iTunes.)_
- [x] Search box over the library. _(Round 8.)_
### Rounds 14 (2026-06-12)
- **Spec 114** — full iTunes-replacement baseline:
- iTunes XML import with Mac→local location remap, play counts/ratings/dates
preserved, smart + system playlists skipped (`importers/itunes_importer.py`).
- Syncthing-friendly JSON storage, conflict-file merge on startup
(`storage/`); data dir lives in the synced music folder.
- iTunes-style layout: sidebar + track view; genre/artist/album browser
(Ctrl+B); per-playlist columns/sort/manual order; playlist folders.
- PyQt6 GUI; playback (mp3/m4a/flac via Qt Multimedia); scrubbing timeline +
transport buttons; Space/←/→ keys + MPRIS2 media keys.
- Drag/copy-paste tracks; drop-to-import files/folders; Get Info tag editing
via mutagen.
- **Round 2** — art paste in Get Info; BPM tap button; guessed ratings dropped
+ migrated; big-art window; 60fps EQ visualizer; cue-don't-play arrows;
now-playing speaker icon.
- **Round 3** — Preferences (`preferences.py`, Edit ▸ Preferences, Ctrl+,);
Last.fm scrobbling (`lastfm.py`, full-play-through only); theming
(`theme.py`: 5 highlight colors, 3 UI scales); shuffle (walk-order);
sidebar restructure (Library button + bottom art); MPRIS artUrl; painted
transport glyphs; drag fix; app icon + `install-desktop.sh`.
- **Round 4** — drag chip + glowing drop line; Library button border; 8px BPM
box; click-to-jump seek slider; vertical browser splitter; fixed-baseline
visualizer (this also resolved the "vibrating bar bottoms" complaint).
### Round 5 (2026-06-13) — UI polish + status bar + browser normalization
- [x] **Visualizer rounded corners** — rounded gray panel + 1px `palette(mid)`
border, bars clipped to the rounded shape (`gui/visualizer.py`).
- [x] **BPM button** flat inside its box, matching the transport icons
(`gui/transport.py`).
- [x] **Bottom status bar** — permanent totals readout `N tracks · DD:HH:MM:SS`
(trimmed leading units) for the visible track set; reflects browser
genre/artist/album selection and playlist contents; transient
import/scrobble/error messages still shown; height scales with UI size
(`gui/track_table.py` `format_total_time`/`tracks_changed`/`total_stats`,
`gui/main_window.py`, `theme.py` `status_height`).
- [x] **Browser normalization** — merge case variants (display the
most-tracks spelling; ties: more capitals, then alphabetical) for genres,
artists, albums; ignore leading "The" when sorting artists; case-insensitive
filtering so a canonical entry matches all variants (`gui/library_view.py`).
- [x] **Header bold bug**`setHighlightSections(False)`; column headers no
longer bold when playback sets the current cell (`gui/track_table.py`).
- [x] **Library button** — light-gray rounded button, not bold
(`gui/sidebar.py`).
- [x] **Playlist title** — name only; count/time moved to the status bar
(`gui/playlist_view.py`).
- [x] Tests: `tests/test_round5.py` (format_total_time, _canonical_values,
_artist_sort_key).
### 2026-06-18 — top control panel tweaks
- [x] **Faster tap-BPM commit** — the tapped tempo now saves to the track 3s
after the cursor leaves the button, down from 6s (`gui/transport.py`
`BpmButton.SAVE_DELAY_MS`).
- [x] **Control panel redesign** — bar height floored at `BAR_HEIGHT` (84px,
~10% under the old ~95px) via `setMinimumHeight`, giving the center column
vertical slack; the title/artist block is centered with **equal** top/bottom
borders (verified ~11px vs ~10px) using equal `addStretch` above and below,
while the seek row stays pinned to the bottom so the timeline sits low. Key
fix: the **bpm box was moved out of the seek row** into its own box on the far
right (`layout.addWidget(_box(...))`). It was a 37px-tall box that inflated the
timeline row, floating the 15px slider with a lopsided phantom gap below the
artist; out of that row the seek row collapses to slider/label height so the
stretches split evenly. Note: `BAR_HEIGHT` is a *floor* — setting it below the
natural stacked height (~69px) has no effect. EQ visualizer panel background
now matches the transport boxes (`palette(alternate-base)` instead of
`window().darker(115)`). (`gui/transport.py`, `gui/visualizer.py`.) Verified
by offscreen `QWidget.grab()` render + widget-geometry measurement
(gnome-screenshot is blocked under Wayland).
- [ ] **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`).
- [ ] Run the real import on trav's library and eyeball the result (fixture in
`./itunes-test-library/`).
- [ ] Album art beyond now-playing (grid/album view); embedded tags only
(decision: no parsing of iTunes' .itc artwork cache).
- [ ] Search box over the library.
- [ ] Background/threaded bulk file import (current import is synchronous).
- [ ] Better duplicate handling on import-by-drop (currently matched by path).
- [ ] Volume control in the transport bar (MPRIS exposes a fixed 1.0).
- [ ] Smart playlists, if ever (skipped at import for now).
- [ ] Wayland edge-drag resize — needs trav's verification; if still bad, try
`lintunes -platform xcb` and switch the .desktop Exec if that fixes it.