bool searchStatsForSongsIn(struct client *client, const char *name, const struct locate_item_list *criteria, GError **error_r) { SearchStats stats; stats.criteria = criteria; stats.numberOfSongs = 0; stats.playTime = 0; if (!db_walk(name, &stats_visitor, &stats, error_r)) return false; printSearchStats(client, &stats); return true; }
int searchStatsForSongsIn(struct client *client, const char *name, const struct locate_item_list *criteria) { SearchStats stats; int ret; stats.criteria = criteria; stats.numberOfSongs = 0; stats.playTime = 0; ret = db_walk(name, searchStatsInDirectory, NULL, &stats); if (ret == 0) printSearchStats(client, &stats); return ret; }