aboutsummaryrefslogtreecommitdiffstats
path: root/src/stats.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-10 02:42:55 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-10 02:42:55 +0000
commit40978425da7321b2763381584543516ef5030cb1 (patch)
treeac4a693f6e56fde43e48bede8e8304b2444ba48e /src/stats.c
parent2d87ffa863b5eaa24862e925e767eb9a36bd58fe (diff)
downloadmpd-40978425da7321b2763381584543516ef5030cb1.tar.gz
mpd-40978425da7321b2763381584543516ef5030cb1.tar.xz
mpd-40978425da7321b2763381584543516ef5030cb1.zip
fix artist and album stats
git-svn-id: https://svn.musicpd.org/mpd/branches/r2562-metadata-handling-rewrite@2569 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/stats.c')
-rw-r--r--src/stats.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/stats.c b/src/stats.c
index 1daeb26e7..6efa8cb8f 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -21,6 +21,8 @@
#include "directory.h"
#include "myfprintf.h"
#include "player.h"
+#include "tag.h"
+#include "tagTracker.h"
#include <time.h>
@@ -34,8 +36,8 @@ void initStats() {
}
int printStats(FILE * fp) {
- /*myfprintf(fp,"artists: %li\n",numberOfArtists());
- myfprintf(fp,"albums: %li\n",numberOfAlbums());*/
+ myfprintf(fp,"artists: %li\n", getNumberOfTagItems(TAG_ITEM_ARTIST));
+ myfprintf(fp,"albums: %li\n", getNumberOfTagItems(TAG_ITEM_ALBUM));
myfprintf(fp,"songs: %i\n",stats.numberOfSongs);
myfprintf(fp,"uptime: %li\n",time(NULL)-stats.daemonStart);
myfprintf(fp,"playtime: %li\n",(long)(getPlayerTotalPlayTime()+0.5));