Apple Music: Limit get_library_tracks to 150 songs per batch (#3094)
authorMizterB <5458030+MizterB@users.noreply.github.com>
Thu, 5 Feb 2026 09:32:59 +0000 (04:32 -0500)
committerGitHub <noreply@github.com>
Thu, 5 Feb 2026 09:32:59 +0000 (10:32 +0100)
Reduce max_limit to 150

music_assistant/providers/apple_music/__init__.py

index e38a640ef4bd109beb38eda897a7f6bb11971ee6..c3de16461b2a623399544d79148ebf2c2c4a5ecd 100644 (file)
@@ -415,8 +415,8 @@ class AppleMusicProvider(MusicProvider):
                 library_only_tracks.append(item)
             else:
                 song_catalog_ids.append(catalog_id)
-        # Obtain catalog info per 200 songs, the documented limit of 300 results in a 504 timeout
-        max_limit = 200
+        # Obtain catalog info per 150 songs, the documented limit of 300 results in a 504 timeout
+        max_limit = 150
         for i in range(0, len(song_catalog_ids), max_limit):
             catalog_ids = song_catalog_ids[i : i + max_limit]
             catalog_endpoint = f"catalog/{self._storefront}/songs"