From fdb9435fbe323592de70bc4f264c641938105ee8 Mon Sep 17 00:00:00 2001 From: Broque Thomas Date: Fri, 16 Jan 2026 10:15:18 -0800 Subject: [PATCH] Fix pagination cursor retrieval in TidalClient Updates the method for obtaining the next cursor during track pagination to use the approach from PR #113, retrieving it from 'links.meta.nextCursor' instead of 'meta.nextCursor'. This ensures correct pagination behavior. --- core/tidal_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/tidal_client.py b/core/tidal_client.py index 4890b925..e0e16876 100644 --- a/core/tidal_client.py +++ b/core/tidal_client.py @@ -757,10 +757,10 @@ class TidalClient: total_fetched += len(batch_tracks) logger.info(f"Fetched {len(batch_tracks)} tracks in this batch, {total_fetched} total so far") - # Get next cursor from meta (not nested in links) - cursor = tracks_page.get("meta", {}).get("nextCursor") + # Get next cursor using PR #113's approach (confirmed working) + cursor = tracks_page.get("links", {}).get("meta", {}).get("nextCursor") - # If no next cursor exists, we're done + # If no cursor found, we're done paginating if not cursor: logger.info("No next cursor found, pagination complete") break