1.092830
[audio-mpd-common.git] / lib / Audio / MPD / Common / Stats.pm
blob5986eaa4413ce17289bcc7989d45bae587160711
1 use strict;
2 use warnings;
4 package Audio::MPD::Common::Stats;
5 # ABSTRACT: class representing MPD stats
7 use Moose;
10 # -- public attributes
12 =attr $stats->artists;
14 Number of artists in the music database.
16 =attr $stats->albums;
18 Number of albums in the music database.
20 =attr $stats->songs;
22 Number of songs in the music database.
24 =attr $stats->uptime;
26 Daemon uptime (time since last startup) in seconds.
28 =attr $stats->playtime;
30 Time length of music played.
32 =attr $stats->db_playtime;
34 Sum of all song times in the music database.
36 =attr $stats->db_update;
38 Last database update in UNIX time.
40 =cut
42 has artists => ( is=>'ro', isa=>'Int', required=>1 );
43 has albums => ( is=>'ro', isa=>'Int', required=>1 );
44 has songs => ( is=>'ro', isa=>'Int', required=>1 );
45 has uptime => ( is=>'ro', isa=>'Int', required=>1 );
46 has playtime => ( is=>'ro', isa=>'Int', required=>1 );
47 has db_playtime => ( is=>'ro', isa=>'Int', required=>1 );
48 has db_update => ( is=>'ro', isa=>'Int', required=>1 );
52 __END__
54 =head1 DESCRIPTION
56 The MPD server maintains some general information. Those information can
57 be queried with the mpd modules. Some of those information are served to
58 you as an L<Audio::MPD::Common::Status> object.
60 An L<Audio::MPD::Common::Stats> object does B<not> update itself
61 regularly, and thus should be used immediately.
63 Note: one should B<never> ever instantiate an L<Audio::MPD::Common::Stats>
64 object directly - use the mpd modules instead.