stats: added stats_update()
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "client.h"
|
||||
#include "player_control.h"
|
||||
#include "strset.h"
|
||||
#include "dbUtils.h"
|
||||
|
||||
Stats stats;
|
||||
|
||||
@@ -33,6 +34,12 @@ void initStats(void)
|
||||
stats.numberOfSongs = 0;
|
||||
}
|
||||
|
||||
void stats_update(void)
|
||||
{
|
||||
stats.numberOfSongs = countSongsIn(NULL);
|
||||
stats.dbPlayTime = sumSongTimesIn(NULL);
|
||||
}
|
||||
|
||||
struct visit_data {
|
||||
enum tag_type type;
|
||||
struct strset *set;
|
||||
|
Reference in New Issue
Block a user