At a "mechanical" level it doesn't seem too difficult to me.
I have a database table of licenses
I have a database table of songs
I have a relationship where song is linked to a license
If there is no license linked to a song then a user cannot stream it.
Now I get that there are complexities around getting the actual license but as said above, no linked license, no play. But then we know lots of tech companies want to bend and break the rules, so, see you in court...