It's technically not illegal to link to a site that links to copyrighted material, but there's still the potential for legal challenges to come up - especially if whatever you build is successful.
The RIAA/MPAA etc can ruin your life with an expensive, years-long lawsuit whether you are found guilty in the end or not.
If you really want to make it, make it for fun and release it anonymously.
Historical context:
Napster: http://en.wikipedia.org/wiki/Napster#Lawsuit
Legal discussion: http://www.lexology.com/library/detail.aspx?g=c71fa5d9-8380-...
(I am not a lawyer! Get legal advice if you are worried!)