use warnings;
use parent qw/Music::Tag::Generic/;
-our $VERSION = '0.000_001';
+our $VERSION = '0.001';
use HTTP::Tiny;
use WWW::Search;
sub get_tag {
my ($self) = @_;
- my $album = $self->info->get_data('album');
+ my $album = $self->info->album;
my $ws = WWW::Search->new('Coveralia::Albums');
$self->status(1, "Searching coveralia for the album $album");
$ws->native_query(WWW::Search::escape_query($album));
while (my $res = $ws->next_result) {
$self->status(1, 'Found album ' . $res->title . ' by ' . $res->artist);
- next if $self->info->has_data('artist') && $self->info->get_data('artist') ne $res->artist;
+ next if $self->info->has_data('artist') && $self->info->artist ne $res->artist;
$self->status(0, 'Selected album ' . $res->title . ' by ' . $res->artist);
if ($res->cover('frontal')) {
my $resp = $ht->get($res->cover('frontal'));
last unless $resp->{success};
- $self->info->set_data(picture => {_Data => $resp->{content}});
+ $self->info->picture({_Data => $resp->{content}});
$self->tagchange('picture');
}
last
=head1 COPYRIGHT AND LICENSE
-Copyright (C) 2014 by Marius Gavrilescu
+Copyright (C) 2014-2015 by Marius Gavrilescu
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.20.1 or,