The name, comment, removals and additions are separate writes, and the
songs to add were only found missing when the last of them ran, so an
unknown songIdToAdd answered error 70 over a playlist already renamed
and trimmed. Every song to add is now looked up first, alongside the
index check, and an unknown one answers 70 with nothing changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
createPlaylist makes a playlist, or with playlistId replaces its songs;
updatePlaylist renames it, sets its comment and visibility, removes songs
by the index the app was shown and adds songs; deletePlaylist deletes it.
A song index counts only the entries getPlaylist lists, so a hidden
entry ahead of it doesn't shift which song goes.
The playlist service gains ReplaceTracks and RemovePositions; the owner
and system-mix checks that each change repeated are one function.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>