Package: gnupod-tools
Version: 0.99.8-2
Severity: normal
Tags: patch

gnupod_addsong fails to read metadata if the fieldnames are not in BLOCKCAPS. 
This is contrary to the the Vorbis comment specification[0] (which FLAC uses 
for its tags) which states "A case-insensitive field name that may consist of 
ASCII 0x20 through 0x7D, 0x3D ('=') excluded. ASCII 0x41 through 0x5A inclusive 
(A-Z) is to be considered equivalent to ASCII 0x61 through 0x7A inclusive 
(a-z).". Some software (MusicBrainz Picard is the one I used) does not write 
the fieldnames in BLOCKCAPS resulting in gnupod failing to read the metadata 
correctly. Picard, for example, writes all lowercase fieldnames.

  [0] http://www.xiph.org/vorbis/doc/v-comment.html

I have patched the gnupod_convert_FLAC script with the patch below which 
corrects this behaviour (although there maybe a better solution).
------8<--------------------------->8------
--- gnupod_convert_FLAC.orig    2011-08-03 12:23:34.581469042 +0100
+++ gnupod_convert_FLAC 2011-08-03 12:41:06.742045179 +0100
@@ -51,13 +51,22 @@
                warn "Error: $@\n";
                exit(1);
        }
-       print "_ARTIST:$ftag->{ARTIST}\n";
-       print "_ALBUM:$ftag->{ALBUM}\n";
-       print "_TITLE:$ftag->{TITLE}\n";
-       print "_GENRE:$ftag->{GENRE}\n";
-       print "_TRACKNUM:$ftag->{TRACKNUMBER}\n";
-       print "_COMMENT:$ftag->{COMMENT}\n";
-       print "_VENDOR:$ftag->{VENDOR}\n";
+
+       # According to the Vobis specification[0] fieldnames are case 
insensitive,
+       # so need to convert to known case to use them as a hash field
+       # [0] http://www.xiph.org/vorbis/doc/v-comment.html
+       my %tags;
+       for my $tag ( keys %$ftag ) {
+               $tags{uc($tag)} = $ftag->{$tag};
+       }
+
+       print "_ARTIST:$tags{ARTIST}\n";
+       print "_ALBUM:$tags{ALBUM}\n";
+       print "_TITLE:$tags{TITLE}\n";
+       print "_GENRE:$tags{GENRE}\n";
+       print "_TRACKNUM:$tags{TRACKNUMBER}\n";
+       print "_COMMENT:$tags{COMMENT}\n";
+       print "_VENDOR:$tags{VENDOR}\n";
        print "_MEDIATYPE:".(GNUpod::FileMagic::MEDIATYPE_AUDIO)."\n";
        print "FORMAT:FLAC\n";
 }
------8<--------------------------->8------

-- System Information:
Debian Release: 6.0.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gnupod-tools depends on:
ii  dpkg                   1.15.8.11         Debian package management system
ii  install-info           4.13a.dfsg.1-6    Manage installed documentation in 
ii  libaudio-flac-header-p 2.3-1             Perl interface to FLAC file header
ii  libdigest-sha1-perl    2.13-1            NIST SHA-1 message digest algorith
ii  libmp3-info-perl       1.24-1            Perl MP3::Info - Manipulate / fetc
ii  libogg-vorbis-header-p 1.0-2             pure Perl interface to Ogg Vorbis 
ii  libtimedate-perl       1.2000-1          collection of modules to manipulat
ii  libunicode-string-perl 2.09-3+b1         Perl modules for Unicode strings
ii  libxml-parser-perl     2.36-1.1+b1       Perl module for parsing XML files
ii  libxml-simple-perl     2.18-3            Perl module for reading and writin
ii  perl                   5.10.1-17squeeze2 Larry Wall's Practical Extraction 

Versions of packages gnupod-tools recommends:
ii  gtkpod                        0.99.14-3  manage songs and playlists on an A

Versions of packages gnupod-tools suggests:
pn  faac                          <none>     (no description available)
ii  flac                          1.2.1-2+b1 Free Lossless Audio Codec - comman
pn  lame                          <none>     (no description available)
pn  timidity                      <none>     (no description available)
ii  vorbis-tools                  1.4.0-1    several Ogg Vorbis tools

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to