our $VERSION = '0.000_001';
-use LWP::Simple qw/get/;
+use HTTP::Tiny;
use WWW::Search;
sub required_values { qw/album/ }
sub set_values { qw/picture/ }
+my $ht = HTTP::Tiny->new(agent => "Music-Tag-Coveralia/$VERSION");
+
sub get_tag {
my ($self) = @_;
next if $self->info->has_data('artist') && $self->info->get_data('artist') ne $res->artist;
$self->status(0, 'Selected album ' . $res->title . ' by ' . $res->artist);
if ($res->cover('frontal')) {
- $self->info->set_data(picture => {_Data => get $res->cover('frontal')});
+ my $resp = $ht->get($res->cover('frontal'));
+ last unless $resp->{success};
+ $self->info->set_data(picture => {_Data => $resp->{content}});
$self->tagchange('picture');
}
last