We currently supports matching only a single track to a collection or library at a time via the match method in collection.py. This requires iterative calls for multiple tracks, which is inefficient for users starting with batches of tracks from playlists or libraries.
To address this, add support for batch matching multiple tracks in a single operation, such as a new match_tracks method that accepts a list of tracks. This would streamline syncing larger sets across music services and leverage batched lookup APIs (like those by track ID from Apple Music or Spotify) for better performance, with fallbacks to individual calls where needed.
Needs a bit of thought but changing the current api to something like this could work:
# Before: Loop over tracks
for track in tracks:
collection.match_track(track)
# After: Single batch call
collection.match_tracks(tracks)
code ref
We currently supports matching only a single track to a collection or library at a time via the
matchmethod incollection.py. This requires iterative calls for multiple tracks, which is inefficient for users starting with batches of tracks from playlists or libraries.To address this, add support for batch matching multiple tracks in a single operation, such as a new
match_tracksmethod that accepts a list of tracks. This would streamline syncing larger sets across music services and leverage batched lookup APIs (like those by track ID from Apple Music or Spotify) for better performance, with fallbacks to individual calls where needed.Needs a bit of thought but changing the current api to something like this could work:
code ref