Spotify is an authorised subscription-based streaming music service that has solved the harder problem. I can find tracks by even mid-level obscure indie acts from 20 years ago on it and listen to them safe in the knowledge that the BPI won’t threaten my kids. But the server and client software are proprietary.
That is silly. The software is easy to reimplement, as the Despotify free software client demonstrates. The secret sauce for Spotify is the licence agreements. They can make the client free software and the server a free network service without endangering those agreements. In fact doing so will increase the value of them, as they will grow and retain the audience for their brand and for their provision of music covered by those agreements.
If Spotify let a thousand projects bloom based on their source code, they could find themselves selling picks and shovels rather than panning for gold. Selling subscriptions to copyright licenced music isn’t particularly a good thing for free culture, but a service that means listeners don’t get sued and musicians are at least in with a chance of getting paid is good. And if it is based on free software and free network services, it can be even better for everyone.