Package: gmediaserver Version: 0.13.0-4 Severity: important Tags: patch My UPNP client shows only the directory hierarchy of my music collection, but no music tracks at all. If I run
$ gmediaserver --profile=generic --expire-time=600 --file-types=mp3,m3u,pls --file-types=mp3 --verbose=4 /home/roderich/Music .... Scanning directory `/home/roderich/Music/Yo La Tengo' Scanning directory `/home/roderich/Music/Yo La Tengo/Summer Sun' Found regular file `01. Beach Party Tonight.mp3' Matched no type Skipping (file type excluded) Found regular file `02. Little Eyes.mp3' Matched no type Skipping (file type excluded) The reason is that with current libmagic1 magic_file() as called by gemediaserver returns "audio/mpeg; charset=binary" for these files (same string as reported by "file -i ..."). But gmediaserver only expects the "audio/mpeg" part, hence fails to recognize the file type. Apparently the MAGIC_* flags for magic_open() changed in newer version of libmagic1 and one should use MAGIC_MIME_TYPE (instead of MAGIC_MIME) to get the MIME type only. Patch attached. -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.31.5 (SMP w/4 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages gmediaserver depends on: ii dpkg 1.15.4.1 Debian package management system ii install-info 4.13a.dfsg.1-5 Manage installed documentation in ii libc6 2.10.1-6 GNU C Library: Shared libraries ii libid3-3.8.3c2a 3.8.3-7.2 Library for manipulating ID3v1 and ii libmagic1 5.03-2 File type determination library us ii libtag1c2a 1.6.1-1 TagLib Audio Meta-Data Library ii libtagc0 1.6.1-1 TagLib Audio Meta-Data Library (C ii libupnp3 1:1.6.6-3 Portable SDK for UPnP Devices (sha ii libuuid1 2.16.1-4 Universally Unique ID library gmediaserver recommends no packages. gmediaserver suggests no packages. -- no debconf information
--- a/src/metadata.c 2009-11-09 20:54:46.000000000 +0100 +++ b/src/metadata.c 2009-11-09 20:56:04.000000000 +0100 @@ -1018,7 +1018,7 @@ bool init_metadata(void) { - magic_cookie = magic_open(MAGIC_SYMLINK|MAGIC_MIME|MAGIC_ERROR); + magic_cookie = magic_open(MAGIC_SYMLINK|MAGIC_MIME_TYPE|MAGIC_ERROR); if (magic_cookie == NULL) { warn(_("cannot initialize magic library\n")); return false;