Atoll/DynamicIsland/MediaControllers
Amir Zarrinkafsh 197c3cfa56
fix(mediacontrollers): artwork for streamed content not added to apple music library
When using the Apple Music controller, album artwork fails to display for streamed tracks that have not been added to the user's Library. AppleScript's `raw data of artwork 1 of current track` returns empty data for these tracks.

This change adds a fallback that searches the iTunes Search API using the track's title and artist, then selects the correct result by matching against the album name from the response fields.

- Added iTunes Search API fallback in `AppleMusicController` for artwork retrieval when AppleScript returns empty artwork data
- Search query uses title and artist only to avoid false matches; album is validated against structured response fields to select the correct result
- Artwork is cached per track to avoid redundant network requests
- Simplified the AppleScript by removing the ineffective Library playlist lookup fallback and collapsed the duplicate macOS 26 / pre-26 script branches
- Replaced `JSONSerialization` dictionary access with `Decodable` structs (`ITunesSearchResponse`, `ITunesTrack`) to match codebase conventions
2026-03-22 11:58:22 +11:00
..
YouTube Music Controller Update copyright headers 2026-01-29 12:26:04 +05:30
AppleMusicController.swift fix(mediacontrollers): artwork for streamed content not added to apple music library 2026-03-22 11:58:22 +11:00
MediaControllerProtocol.swift Update copyright headers 2026-01-29 12:26:04 +05:30
NowPlayingController.swift HotFix: Now Playing 2026-03-07 20:19:18 +05:30
SpotifyController.swift Update copyright headers 2026-01-29 12:26:04 +05:30