summaryrefslogtreecommitdiff
path: root/audio/p5-MP3-Info/patches/patch-aa
blob: 450eb16e742da405e72773ee205ec4d6d1f0f21d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
$NetBSD: patch-aa,v 1.1 2002/12/30 23:12:41 kim Exp $

--- Info.pm.orig	Tue Feb 26 18:03:29 2002
+++ Info.pm	Mon Dec 30 15:18:03 2002
@@ -8,7 +8,7 @@
 	@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION $REVISION
 	@mp3_genres %mp3_genres @winamp_genres %winamp_genres $try_harder
 	@t_bitrate @t_sampling_freq @frequency_tbl %v1_tag_fields
-	@v1_tag_names %v2_tag_names %v2_to_v1_names $AUTOLOAD
+	@v1_tag_names %v2_tag_names %v2_to_symbol $AUTOLOAD
 );
 
 @ISA = 'Exporter';
@@ -471,10 +471,10 @@
 			%info = %$v2;
 			$info{TAGVERSION} = $v2h->{version};
 		} else {
-			for (keys %v2_to_v1_names) {
+			for (keys %v2_to_symbol) {
 				if (exists $v2->{$_}) {
 					if ($_ =~ /^TCON?$/ && $v2->{$_} =~ /^.?\((\d+)\)/) {
-						$info{$v2_to_v1_names{$_}} = $mp3_genres[$1];
+						$info{$v2_to_symbol{$_}} = $mp3_genres[$1];
 					} else {
 						my $data = $v2->{$_};
 
@@ -510,7 +510,8 @@
 								$data = $u->utf8;
 							}
 						}
-						$info{$v2_to_v1_names{$_}} = $data;
+						$info{$v2_to_symbol{$_}} = $data;
+						$info{$_} = $data;
 					}
 				}
 			}
@@ -1077,23 +1078,39 @@
 
 	@v1_tag_names = qw(TITLE ARTIST ALBUM YEAR COMMENT TRACKNUM GENRE);
 
-	%v2_to_v1_names = (
+	%v2_to_symbol = (
 		# v2.2 tags
+		'TT1' => 'CONTENTGROUP',
 		'TT2' => 'TITLE',
+		'TT3' => 'SUBTITLE',
 		'TP1' => 'ARTIST',
+		'TP2' => 'BAND',
+		'TP3' => 'CONDUCTOR',
+		'TP4' => 'MIXARTIST',
+		'TCM' => 'COMPOSER',
+		'TXT' => 'LYRICIST',
 		'TAL' => 'ALBUM',
 		'TYE' => 'YEAR',
 		'COM' => 'COMMENT',
 		'TRK' => 'TRACKNUM',
 		'TCO' => 'GENRE', # not clean mapping, but ...
+		'TBP' => 'BPM',
 		# v2.3 tags
+		'TIT1' => 'CONTENTGROUP',
 		'TIT2' => 'TITLE',
+		'TIT3' => 'SUBTITLE',
 		'TPE1' => 'ARTIST',
+		'TPE2' => 'BAND',
+		'TPE3' => 'CONDUCTOR',
+		'TPE4' => 'MIXARTIST',
+		'TCOM' => 'COMPOSER',
+		'TEXT' => 'LYRICIST',
 		'TALB' => 'ALBUM',
 		'TYER' => 'YEAR',
 		'COMM' => 'COMMENT',
 		'TRCK' => 'TRACKNUM',
 		'TCON' => 'GENRE',
+		'TBPM' => 'BPM',
 	);
 
 	%v2_tag_names = (