aboutsummaryrefslogtreecommitdiffstats
path: root/src/stats.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-18 15:40:28 +0100
committerMax Kellermann <max@duempel.org>2009-01-18 15:40:28 +0100
commit91fb2a29deaafcc0ae9c710aec3c5cf54ce60d91 (patch)
tree03c1630db5f1f991dbe7d1cca7dd57793d61f0b3 /src/stats.h
parent0d449d8df745c5c527f637f42e33156b92ac174d (diff)
downloadmpd-91fb2a29deaafcc0ae9c710aec3c5cf54ce60d91.tar.gz
mpd-91fb2a29deaafcc0ae9c710aec3c5cf54ce60d91.tar.xz
mpd-91fb2a29deaafcc0ae9c710aec3c5cf54ce60d91.zip
stats: added num_artists, num_albums
Don't recalculate the number of artists and albums each time a client requests statistics. Calculate that once in stats_update().
Diffstat (limited to 'src/stats.h')
-rw-r--r--src/stats.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stats.h b/src/stats.h
index 143ee0045..0c82cb16c 100644
--- a/src/stats.h
+++ b/src/stats.h
@@ -30,6 +30,12 @@ struct stats {
/** sum of all song durations in the music directory (in
seconds) */
unsigned long song_duration;
+
+ /** number of distinct artist names in the music directory */
+ unsigned artist_count;
+
+ /** number of distinct album names in the music directory */
+ unsigned album_count;
};
extern struct stats stats;