1 | 1c1 |
---|
2 | < #!/usr/bin/perl |
---|
3 | --- |
---|
4 | > #!/opt/local/bin/perl |
---|
5 | 8c8 |
---|
6 | < # malicious ID3v1 tag could hose you. |
---|
7 | --- |
---|
8 | > # malicious FLAC/ID3v1 tag could hose you. |
---|
9 | 11c11 |
---|
10 | < use MP3::Info; |
---|
11 | --- |
---|
12 | > use Audio::FLAC::Header; |
---|
13 | 19,20c19,21 |
---|
14 | < if ($tag = get_mp3tag($file)) { |
---|
15 | < $year = $tag->{YEAR}; |
---|
16 | --- |
---|
17 | > if ($flac = Audio::FLAC::Header->new($file)) { |
---|
18 | > $tag = $flac->tags(); |
---|
19 | > $year = $tag->{DATE}; |
---|
20 | 26c27 |
---|
21 | < $tracknum = $tag->{TRACKNUM}; |
---|
22 | --- |
---|
23 | > $tracknum = $tag->{TRACKNUMBER}; |
---|
24 | 30c31 |
---|
25 | < print "Couldn't get id3v1 tag for $file.\n"; |
---|
26 | --- |
---|
27 | > print "Couldn't get flac tags for $file.\n"; |
---|