v0.38.0: several imported songs are identified as one batch

No identify dialog pops up mid-download any more: songs are looked up
quietly as they land and reviewed together once the last one is in, as
rows in the app's columns. Songs that are one album get the album-wide
fields once, unified, plus a cover from the album-art search. Ticked
rows apply as one undo step; unticked ones get the ordinary dialog
after. Popups wait for LinTunes to be the app in front.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-09 01:42:13 -07:00
co-authored by Claude Opus 5.5
parent 581be8d732
commit f899794068
9 changed files with 1150 additions and 8 deletions
+11 -1
View File
@@ -321,7 +321,12 @@ def window(qapp, tmp_path, fake, monkeypatch):
identified = []
monkeypatch.setattr(win, "_enqueue_identify", identified.extend)
win.identified = identified
reviews = []
monkeypatch.setattr(win, "_show_batch_review", reviews.append)
win.reviews = reviews
yield win
if win._url_batch is not None: # lookups still out: never review them
win._url_batch.cancel()
win.close()
@@ -360,4 +365,9 @@ def test_spotify_songs_import_tagged_and_go_to_identify(window, qapp, fake,
assert sorted((t.artist, t.album, t.name) for t in lib) == [
("The Breeders", "Last Splash", "Cannonball"),
("The Breeders", "Last Splash", "New Year")]
assert len(window.identified) == 2
# Several songs: no dialog each, one review once both are in.
assert window.identified == []
_pump(qapp, lambda: window.reviews)
[analysis] = window.reviews
assert analysis.is_album and analysis.album == "Last Splash"
assert len(analysis.rows) == 2