The Windows Media Player doesn't handle the virtual diectories correctly, resulting in files listed multiple times. This patch will limit the results send to WMP to physically existing files.
The patch adds the option '<virtual-layout wmp-workaround="yes">' which defaults to no.
If the option is turned on incoming browse requests will be searched for an 'xmlns:dt' attribute containing the string 'microsoft'. That seems to specific to WMP requests (tested WMP 12, vlc 1.1.4, djmount and Andromote). If the attribute is present, the query for the root elements will be limited to the pc-directory only. This is obviously mutual exclusive with the no file system root option (upnp-hide), which takes precedence if it is on.
The user agent check may be naiv, but at least it works me. The clients send an HTTP request prior the upnp browse action, but I wasn't able to figure out where it is processed by Mediatomb. This request would definitly be a better source to determine the User Agent because of, erm, the User Agent header.
The readme.lyx may be screwed up. It looks ok when rendered with elyxer but I'm not sure it works with all others as well.