Find config.xml, part of mediatomb (/etc/mediatomb/config.xml). I have had good luck with mediatomb.
Edit the file, and follow the directions in there. Basically, remove comments for some sections, everywhere it talks about the DSM series. Make sure you comment in the section in the MAP area, so that the right MIME type is brought in for the DSM-510.
Good luck, keep us posted...