Could you look into implementing Music Assistant ?
It is an open-source music server that centralizes all sources (Spotify, Apple Music, Tidal, local files, Plex/Jellyfin, radio, podcasts, etc.) and streams them to most speaker types (Sonos, AirPlay, Cast, DLNA, Snapcast, …).
➜ More info: https://www.music-assistant.io/
