summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/LastFM/Export.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/LastFM/Export.pm b/lib/LastFM/Export.pm
index c36f65f..dfad065 100644
--- a/lib/LastFM/Export.pm
+++ b/lib/LastFM/Export.pm
@@ -34,12 +34,13 @@ has lastfm => (
sub track_count {
my $self = shift;
+ my (%params) = @_;
+
+ $params{method} = 'user.getRecentTracks';
+ $params{user} = $self->user;
+ $params{limit} = 1;
- return $self->lastfm->request(
- method => 'user.getRecentTracks',
- user => $self->user,
- limit => 1,
- )->{recenttracks}{'@attr'}{total};
+ return $self->lastfm->request(%params)->{recenttracks}{'@attr'}{total};
}
sub tracks {