ok, now song->url is only the filename, not the full path to the song

git-svn-id: https://svn.musicpd.org/mpd/trunk@2602 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes
2004-11-11 02:59:16 +00:00
parent 4ec3df0339
commit d6a87f538d
13 changed files with 57 additions and 37 deletions

View File

@@ -277,6 +277,17 @@ int sumSavedMemoryInDirectory(FILE * fp, Directory * dir, void * data) {
*sum += (strlen(dir->utf8name)+1-sizeof(Directory *))*
dir->songs->numberOfNodes;
/**sum += (strlen(dir->utf8name)+1)*
dir->subDirectories->numberOfNodes;*/
return 0;
}
int sumSavedMemoryInSong(FILE * fp, Song * song, void * data) {
int * sum = data;
*sum += strlen(song->url)+1;
return 0;
}
@@ -284,8 +295,8 @@ int sumSavedMemoryInDirectory(FILE * fp, Directory * dir, void * data) {
void printSavedMemoryFromFilenames() {
int sum;
traverseAllIn(stderr, NULL, NULL, sumSavedMemoryInDirectory,
(void *)&sum);
traverseAllIn(stderr, NULL, sumSavedMemoryInSong,
sumSavedMemoryInDirectory, (void *)&sum);
DEBUG("saved memory from filenames: %i\n", sum);
}