[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: |
Sun, 20 Nov 2005 10:50:34 +0000 |
User-agent: |
Mozilla Thunderbird 1.0.6 (X11/20050723) |
Andrew McGuinness wrote:
The "very simplistic" oggtagreader.pm code doesn't work on my Ogg files
- it produces a random punctuation character at the end of many of the
Artist names.
The correct code for reading Ogg comment tags is in ogginfo.pm anyway -
the following patch uses it instead of oggtagreader.pm . oggtagreader.pm
becomes obsolete:
========================
Previous patch misses the track number - correction:
darjeeling gnump3d $ diff readtags.pm.orig readtags.pm
9d8
< use gnump3d::oggtagreader; # Local vorbis code
177,179c176,180
<
< 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];
> }
186c187
< $TAGS{'TRACK'} = $tags{'track'} || "";
---
> $TAGS{'TRACK'} = $tags{'tracknumber'} || "";
189c190
< $TAGS{'YEAR'} = $tags{'year'} || "";
---
> $TAGS{'YEAR'} = $tags{'date'} || "";
--
Andrew McGuinness
Luton, UK