This works flawlessly for me - just got to Settings/Sounds and Notifications/Volume. Then slide all sounds you do not want to hear down to Silent. Done!
(In the screenshot you'll see my ringer on because I personally DO want my music interrupted by phone calls only since I'm relaxing but...