From 91fb2a29deaafcc0ae9c710aec3c5cf54ce60d91 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 18 Jan 2009 15:40:28 +0100 Subject: 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(). --- src/stats.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/stats.h') diff --git a/src/stats.h b/src/stats.h index 143ee004..0c82cb16 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; -- cgit v1.2.3