Clean up method calls
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 9 May 2015 07:38:57 +0000 (10:38 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 9 May 2015 07:38:57 +0000 (10:38 +0300)
lib/Music/Tag/Coveralia.pm

index fe2e9c66f0908c089f3130bc0faa80d6bfe4cfa7..34ae9e13a071da5bf61d6ad9d543b5e5a76a2e03 100644 (file)
@@ -18,18 +18,18 @@ my $ht = HTTP::Tiny->new(agent => "Music-Tag-Coveralia/$VERSION");
 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
This page took 0.011278 seconds and 4 git commands to generate.