[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnump3d-users] Ogg tags error
From: |
Andrew McGuinness |
Subject: |
Re: [Gnump3d-users] Ogg tags error |
Date: |
Fri, 02 Dec 2005 06:29:38 +0000 |
User-agent: |
Mozilla Thunderbird 1.0.6 (X11/20050723) |
One more try - this time without a signature in the middle:
? patch1.diff
Index: lib/gnump3d/readtags.pm
===================================================================
RCS file: /cvsroot/gnump3d/gnump3d/lib/gnump3d/readtags.pm,v
retrieving revision 1.3
diff -u -r1.3 readtags.pm
--- lib/gnump3d/readtags.pm 12 Aug 2005 04:25:54 -0000 1.3
+++ lib/gnump3d/readtags.pm 2 Dec 2005 06:28:37 -0000
@@ -6,7 +6,6 @@
use strict;
use gnump3d::ogginfo; # Pure Perl OGG Vorbis tag parsing.
-use gnump3d::oggtagreader; # Local vorbis code
use gnump3d::mp3info; # Local copy of MP3::Info.
use gnump3d::mp4info; # Local copy of MP4::Info.
use gnump3d::WMA; # Local copy of Audio::WMA
@@ -174,19 +173,21 @@
$TAGS{uc($key)} = $v;
}
-
- my $comment = gnump3d::oggtagreader->new( );
- my %tags = $comment->getTags($file);
+ my %tags;
+ foreach my $ckey ( $reader->comment_tags() )
+ {
+ $tags{lc($ckey)} = ($reader->comment( $ckey ))[0];
+ }
if ( keys( %tags ) )
{
$TAGS{'ARTIST'} = $tags{'artist'} || "";
$TAGS{'COMMENT'}= $tags{'comment'} || "";
$TAGS{'GENRE'} = $tags{'genre'} || "";
- $TAGS{'TRACK'} = $tags{'track'} || "";
+ $TAGS{'TRACK'} = $tags{'tracknumber'} || "";
$TAGS{'ALBUM'} = $tags{'album'} || "";
$TAGS{'TITLE'} = $tags{'title'} || "";
- $TAGS{'YEAR'} = $tags{'year'} || "";
+ $TAGS{'YEAR'} = $tags{'date'} || "";
$TAGS{'SIZE'} = $tags{'size'} || "";
if ($TAGS{'LENGTH'}) # Ogg returns in sss format vice mm:ss
{