diff options
Diffstat (limited to '')
-rw-r--r-- | src/dbUtils.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c index 3677b2ae6..cd1476d9d 100644 --- a/src/dbUtils.c +++ b/src/dbUtils.c @@ -51,16 +51,6 @@ typedef struct _SearchStats { } SearchStats; static int -countSongsInDirectory(struct directory *directory, void *data) -{ - int *count = (int *)data; - - *count += directory->songs.nr; - - return 0; -} - -static int printDirectoryInDirectory(struct directory *directory, void *data) { struct client *client = data; @@ -237,43 +227,12 @@ directoryPrintSongInfo(struct song *song, void *data) return 0; } -static int -sumSongTime(struct song *song, void *data) -{ - unsigned long *sum_time = (unsigned long *)data; - - if (song->tag && song->tag->time >= 0) - *sum_time += song->tag->time; - - return 0; -} - int printInfoForAllIn(struct client *client, const char *name) { return db_walk(name, directoryPrintSongInfo, printDirectoryInDirectory, client); } -int countSongsIn(const char *name) -{ - int count = 0; - void *ptr = (void *)&count; - - db_walk(name, NULL, countSongsInDirectory, ptr); - - return count; -} - -unsigned long sumSongTimesIn(const char *name) -{ - unsigned long dbPlayTime = 0; - void *ptr = (void *)&dbPlayTime; - - db_walk(name, sumSongTime, NULL, ptr); - - return dbPlayTime; -} - static ListCommandItem *newListCommandItem(int tagType, int numConditionals, LocateTagItem * conditionals) { |