Audio::MPD::Common::Stats - class representing MPD stats


Audio-MPD-Common documentation Contained in the Audio-MPD-Common distribution.

Index


Code Index:

NAME

Top

Audio::MPD::Common::Stats - class representing MPD stats

VERSION

Top

version 1.110550

DESCRIPTION

Top

The MPD server maintains some general information. Those information can be queried with the mpd modules. Some of those information are served to you as an Audio::MPD::Common::Stats object.

An Audio::MPD::Common::Stats object does not update itself regularly, and thus should be used immediately.

Note: one should never ever instantiate an Audio::MPD::Common::Stats object directly - use the mpd modules instead.

ATTRIBUTES

Top

$stats->artists;

Number of artists in the music database.

$stats->albums;

Number of albums in the music database.

$stats->songs;

Number of songs in the music database.

$stats->uptime;

Daemon uptime (time since last startup) in seconds.

$stats->playtime;

Time length of music played.

$stats->db_playtime;

Sum of all song times in the music database.

$stats->db_update;

Last database update in UNIX time.

AUTHOR

Top

  Jerome Quelin

COPYRIGHT AND LICENSE

Top


Audio-MPD-Common documentation Contained in the Audio-MPD-Common distribution.

#
# This file is part of Audio-MPD-Common
#
# This software is copyright (c) 2007 by Jerome Quelin.
#
# This is free software; you can redistribute it and/or modify it under
# the same terms as the Perl 5 programming language system itself.
#
use 5.008;
use strict;
use warnings;

package Audio::MPD::Common::Stats;
BEGIN {
  $Audio::MPD::Common::Stats::VERSION = '1.110550';
}
# ABSTRACT: class representing MPD stats

use Moose;
use MooseX::Has::Sugar;
use MooseX::Types::Moose qw{ Int };


# -- public attributes


has artists     => ( ro, isa=>Int, required );
has albums      => ( ro, isa=>Int, required );
has songs       => ( ro, isa=>Int, required );
has uptime      => ( ro, isa=>Int, required );
has playtime    => ( ro, isa=>Int, required );
has db_playtime => ( ro, isa=>Int, required );
has db_update   => ( ro, isa=>Int, required );


1;



__END__