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().
This commit is contained in:
Max Kellermann
2009-01-18 15:40:28 +01:00
parent 0d449d8df7
commit 91fb2a29de
2 changed files with 16 additions and 8 deletions
+6
View File
@@ -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;