Package: libaudio-file-perl
Version: 0.08-1
Severity: wishlist
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Audio::File should be able to handle the disc number tags available in newer
tag formats. Specifically the DISCNUMBER tag in Ogg and FLAC and the TPOS tag
in ID3v2 MP3 files. I have already made the necessary changes and attached a
patch to provide the missing functionality. I have tested the code with Ogg,
FLAC, and MP3 files and it has worked without a problem on all file types.

- -- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-11-amd64-k8
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages libaudio-file-perl depends on:
ii  libaudio-flac-perl            0.7-1      Perl interface to FLAC file inform
ii  libmp3-info-perl              1.13-1     Perl MP3::Info - Manipulate / fetc
ii  libmp3-tag-perl               0.97-1     Module for reading tags of MP3 aud
ii  libogg-vorbis-header-pureperl 0.07-2     A pure Perl interface to Ogg Vorbi
ii  perl                          5.8.7-7    Larry Wall's Practical Extraction 

libaudio-file-perl recommends no packages.

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDaqtTBPYwh6bSSDcRAr+eAJ9Bw2bi3G4WovzCT+i2L1rob1n2NwCfWIP0
E1FY9I8+5qPjw1mFRKDvftg=
=e6iM
-----END PGP SIGNATURE-----
diff -Naur Audio.orig/File/Flac/Tag.pm Audio/File/Flac/Tag.pm
--- Audio.orig/File/Flac/Tag.pm 2004-08-05 04:10:52.000000000 -0700
+++ Audio/File/Flac/Tag.pm      2005-11-03 16:09:45.739772000 -0800
@@ -19,6 +19,7 @@
        $self->genre(   $flactag->{GENRE}               );
        $self->year(    $flactag->{DATE}                );
        $self->track(   $flactag->{TRACKNUMBER} );
+       $self->disc(    $flactag->{DISCNUMBER} );
 
        return 1;
 }
diff -Naur Audio.orig/File/Mp3/Tag.pm Audio/File/Mp3/Tag.pm
--- Audio.orig/File/Mp3/Tag.pm  2004-08-20 16:24:39.000000000 -0700
+++ Audio/File/Mp3/Tag.pm       2005-11-03 16:03:29.697356000 -0800
@@ -13,6 +13,11 @@
        $self->{mp3}->get_tags();
 
        my ($title, $track, $artist, $album, $comment, $year, $genre) = 
$self->{mp3}->autoinfo();
+       
+       my $disc;
+       if (exists $self->{mp3}->{ID3v2}) {
+               $disc = $self->{mp3}->{ID3v2}->get_frame("TPOS");
+       }
 
        $self->title( $title );
        $self->artist( $artist );
@@ -21,6 +26,7 @@
        $self->genre( $genre );
        $self->year( $year );
        $self->track( $track );
+       $self->disc( $disc );
 
        return 1;
 }
diff -Naur Audio.orig/File/Ogg/Tag.pm Audio/File/Ogg/Tag.pm
--- Audio.orig/File/Ogg/Tag.pm  2004-08-05 04:12:01.000000000 -0700
+++ Audio/File/Ogg/Tag.pm       2005-11-03 16:15:28.589534338 -0800
@@ -17,7 +17,8 @@
        $self->comment( $self->{ogg}->comment('comment')        );
        $self->genre(   $self->{ogg}->comment('genre')          );
        $self->year(    $self->{ogg}->comment('date')           );
-       $self->track(   $self->{ogg}->comment('tracknumber'));
+       $self->track(   $self->{ogg}->comment('tracknumber')    );
+       $self->disc(    $self->{ogg}->comment('discnumber')     );
 
        return 1;
 }
diff -Naur Audio.orig/File/Tag.pm Audio/File/Tag.pm
--- Audio.orig/File/Tag.pm      2004-08-05 08:49:48.000000000 -0700
+++ Audio/File/Tag.pm   2005-11-03 09:33:55.550414000 -0800
@@ -163,6 +163,23 @@
 
 }
 
+=head2 disc
+
+Set/get the disc field in the files tag.
+
+=cut
+
+sub disc {
+       my $self = shift;
+       if ( @_ ) {
+               $self->{disc} = shift;
+               return 1;
+       }
+
+       return $self->{disc};
+
+}
+
 =head2 is_empty
 
 Returns whether all tag fields are empty or not.

Reply via email to