forked from trav/lintunes
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.
This commit is contained in:
@@ -605,9 +605,14 @@ class LibraryManager(QObject):
|
||||
track already has costs nothing and a track that ends up unchanged is
|
||||
skipped entirely (no file write, no undo entry).
|
||||
"""
|
||||
self.edit_many_track_fields({tid: fields for tid in track_ids})
|
||||
|
||||
def edit_many_track_fields(self, edits: dict[int, dict]):
|
||||
"""``edit_tracks_fields`` with different fields per track ({track id:
|
||||
fields}) — a batch identify's rows — still ONE undoable command."""
|
||||
changes = [] # (track_id, new_fields, old_fields)
|
||||
with timed("edit_tracks_fields (%d tracks)", len(track_ids)):
|
||||
for track_id in track_ids:
|
||||
with timed("edit_many_track_fields (%d tracks)", len(edits)):
|
||||
for track_id, fields in edits.items():
|
||||
track = self.library.tracks.get(track_id)
|
||||
if not track:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user