QuoteAPEv2 tags are returned as a hash of key/value pairs.
1 2 3 4 5 6 7 8 9 10 11
#!/usr/bin/perl use 5.28.1; use warnings; use strict; use Audio::Scan; use Data::Dumper; local $ENV{AUDIO_SCAN_NO_ARTWORK} = 1; my $data = Audio::Scan->scan('/root/test.mp3'); say Dumper($data->{tags});
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
./testScan.pl
APE: [Invalid item flags] /root/test.mp3
APE: [Invalid item flags] /root/test.mp3
$VAR1 = {
'CUE' => '0',
'TITLE' => 'Freedom -- 1984',
'ARTIST' => 'Wham!',
'RECORDDATE' => '30682',
'ALBUM' => 'Freedom',
'OUTRO' => '276900',
'TPE1' => 'Wham!',
'TIT2' => 'Freedom -- 1984',
'URL2' => 'http://www.amazon.de/gp/product/B003TH0TWK?ie=UTF8&tag=httpwwwstatio-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=B003TH0TWK',
'CONDUCTOR' => 'George Michael',
'SEGUEDB' => '0',
'LANGUAGE' => 'Englisch',
'URL' => 'https://images-eu.ssl-images-amazon.com/images/I/51LDg28nsgL._SL160_.jpg',
'HOOKLEN' => '-1',
'RATING' => '4',
'TCON' => 'Blues',
'INTRO' => '15500',
'CUEOVERLAP' => '0',
'COMPOSER' => 'George Michael',
'DURATION' => '293500',
'TEMPO' => '3',
'HOOKSTART' => '-1',
'PUBLISHER' => 'Epic',
'SEGUE' => '0',
'YEAR' => '1984',
'TALB' => 'Freedom',
'GENDER' => '1',
'ENERGY' => '3',
'EAN/UPC' => 'B003TH0TWK',
'TDRC' => '1984'
};
1 2 3 4 5 6 7 8
while ( my ($key, $value) = each %{$data->{tags}} ) { say "$key => $value"; } for my $key ( sort keys %{$data->{tags}} ) { say "$key : ", $data->{tags}->{$key}; }
2020-06-29T15:57:22 GwenDragonDu musst derefenzieren. ;)
Code (perl): (dl )%{$data->{tags}}
2020-06-29T16:14:50 cbxk1xg:-)Ahh!!! Das war's. Danke, liebe Drachendame!
QuoteJa, letzteres.Ich glaube ich erinnere mich langsam. Das Return-Objekt ist ja kein Hash sondern nur eine Referenz auf einen Hash, richtig?!
QuoteThis method returns a hashref containing two other hashrefs: info and tags.
— <https://metacpan.org/pod/Audio::Scan#scan(-$path,-...>