Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't mix up a picture's type with its description. #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion lib/Music/Tag/FLAC.pm
Original file line number Diff line number Diff line change
@@ -10,6 +10,30 @@ our $VERSION = '0.4101';
use Audio::FLAC::Header;
use base qw(Music::Tag::Generic);

use constant PICTURE_TYPES => (
"Other",
"32x32 pixels 'file icon' (PNG only)",
"Other file icon",
"Cover (front)",
"Cover (back)",
"Leaflet page",
"Media (e.g. label side of CD)",
"Lead artist/lead performer/soloist",
"Artist/performer",
"Conductor",
"Band/Orchestra",
"Composer",
"Lyricist/text writer",
"Recording Location",
"During recording",
"During performance",
"Movie/video screen capture",
"A bright coloured fish",
"Illustration",
"Band/artist logotype",
"Publisher/Studio logotype",
);

sub flac {
my $self = shift;
unless ((exists $self->{_Flac}) && (ref $self->{_Flac})) {
@@ -69,7 +93,8 @@ sub get_tag {
my $pic = $self->flac->picture;
$self->info->set_data('picture', {
"MIME type" => $pic->{mimeType},
"Picture Type" => $pic->{description},
"Picture Type" => (PICTURE_TYPES)[$pic->{pictureType}],
"Description" => $pic->{description},
"_Data" => $pic->{imageData},
});
}