Two issues prevented queue restoration from working:
1. MediaItem.toJson() was passing providerMappings directly instead of
converting each ProviderMapping to JSON. This meant jsonEncode would
fail to serialize them, losing the provider mapping data.
2. _restoreQueueFromCache was filtering for track.uri, but queue items
from MA API don't include URIs. playTracks uses providerMappings to
build URIs via _buildTrackUri(), so we should check for those instead.
Now providerMappings are properly serialized/deserialized, and queue
restore checks for available providerMappings (or provider+itemId as
fallback) to match what playTracks expects.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>