NAME
Audio::MPD::Stats - class representing MPD stats
SYNOPSIS
my $status = $mpd->stats;
print $stats->artists;
DESCRIPTION
The MPD server maintains some general information. Those information can be queried with the stats()
method of Audio::MPD
. This method returns an Audio::MPD::Stats
object, containing all relevant information.
Note that an Audio::MPD::Stats
object does not update itself regularly, and thus should be used immediately.
METHODS
Constructor
- new( %kv )
-
The
new()
method is the constructor for theAudio::MPD::Status
class. It is called internally by thestats()
method ofAudio::MPD
, with the result of thestats
command sent to MPD server.Note: one should never ever instantiate an
Audio::MPD::Stats
object directly - use thestats()
method ofAudio::MPD
.
Accessors
Once created, one can access to the following members of the object:
- $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.
Please note that those accessors are read-only: changing a value will not change the current settings of MPD server. Use Audio::MPD
methods to alter the settings.
SEE ALSO
You can find more information on the mpd project on its homepage at http://www.musicpd.org, or its wiki http://mpd.wikia.com.
Regarding this Perl module, you can report bugs on CPAN via http://rt.cpan.org/Public/Bug/Report.html?Queue=Audio-MPD.
Audio::MPD development takes place on <audio-mpd@googlegroups.com>: feel free to join us. (use http://groups.google.com/group/audio-mpd to sign in). Our subversion repository is located at https://svn.musicpd.org.
AUTHORS
Jerome Quelin <jquelin@cpan.org>
COPYRIGHT AND LICENSE
Copyright (c) 2007 Jerome Quelin <jquelin@cpan.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.