aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/directory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/directory.c b/src/directory.c
index d7a7d582f..70b360822 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -789,8 +789,6 @@ int writeDirectoryDB() {
deleteEmptyDirectoriesInDirectory(mp3rootDirectory);
sortDirectory(mp3rootDirectory);
- stats.numberOfSongs = countSongsIn(stderr,NULL);
- stats.dbPlayTime = sumSongTimesIn(stderr,NULL);
while(!(fp=fopen(directorydb,"w")) && errno==EINTR);
if(!fp) return -1;
@@ -1128,6 +1126,8 @@ unsigned long sumSongTimesIn(FILE * fp, char * name) {
void initMp3Directory() {
mp3rootDirectory = newDirectory(NULL,0);
exploreDirectory(mp3rootDirectory);
+ stats.numberOfSongs = countSongsIn(stderr,NULL);
+ stats.dbPlayTime = sumSongTimesIn(stderr,NULL);
}
Song * getSongDetails(char * file, char ** shortnameRet,