Chunk Plex Wish List track adds to avoid Apple's silent large-batch failures #48

Merged
neerdoc merged 1 commit from macsome_7 into main 2026-07-28 11:51:08 +00:00
Owner

Live evidence: a 574-track add reported success (added=574, no exception)
but Music Assistant's own playlist view still showed only 35 tracks
afterward - the previous count, unchanged. Apple's own developer community
documents this exact failure mode for the library-playlist track-add
endpoint: large batches can report success while the tracks never
actually land, completely silently, with no official batch size limit
published. MA's add_playlist_tracks is itself fire-and-forget ("creates
background tasks to process the action"), so neither side can detect a
silent failure after the fact.

Chunks the add into batches of 25 (matching the batching precedent already
used for the Qobuz wishlist push elsewhere in this file) with a 1s delay
between batches, to give each batch a much better chance of actually
persisting. Not a guaranteed fix - Apple's failures are reported as
inconsistent even at moderate sizes - but the sync recomputes its diff
fresh every run, so anything that still doesn't persist will simply
reappear as "to add" on the next sync rather than being lost.

Live evidence: a 574-track add reported success (added=574, no exception) but Music Assistant's own playlist view still showed only 35 tracks afterward - the previous count, unchanged. Apple's own developer community documents this exact failure mode for the library-playlist track-add endpoint: large batches can report success while the tracks never actually land, completely silently, with no official batch size limit published. MA's add_playlist_tracks is itself fire-and-forget ("creates background tasks to process the action"), so neither side can detect a silent failure after the fact. Chunks the add into batches of 25 (matching the batching precedent already used for the Qobuz wishlist push elsewhere in this file) with a 1s delay between batches, to give each batch a much better chance of actually persisting. Not a guaranteed fix - Apple's failures are reported as inconsistent even at moderate sizes - but the sync recomputes its diff fresh every run, so anything that still doesn't persist will simply reappear as "to add" on the next sync rather than being lost.
Live evidence: a 574-track add reported success (added=574, no exception)
but Music Assistant's own playlist view still showed only 35 tracks
afterward - the previous count, unchanged. Apple's own developer community
documents this exact failure mode for the library-playlist track-add
endpoint: large batches can report success while the tracks never
actually land, completely silently, with no official batch size limit
published. MA's add_playlist_tracks is itself fire-and-forget ("creates
background tasks to process the action"), so neither side can detect a
silent failure after the fact.

Chunks the add into batches of 25 (matching the batching precedent already
used for the Qobuz wishlist push elsewhere in this file) with a 1s delay
between batches, to give each batch a much better chance of actually
persisting. Not a guaranteed fix - Apple's failures are reported as
inconsistent even at moderate sizes - but the sync recomputes its diff
fresh every run, so anything that still doesn't persist will simply
reappear as "to add" on the next sync rather than being lost.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
WulfScience-FOSS/ha-music-own!48
No description provided.