aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-03-09 23:07:26 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-03-09 23:07:26 +0000
commit1459ee22fe0aee6aa754d3bbb56e76840f4ee1c1 (patch)
tree41f5f4e39c4503be0137261324bc6f05e99b250f
parentefa083c887c9f82c224afb007cecaac678af63e3 (diff)
downloadmpd-1459ee22fe0aee6aa754d3bbb56e76840f4ee1c1.tar.gz
mpd-1459ee22fe0aee6aa754d3bbb56e76840f4ee1c1.tar.xz
mpd-1459ee22fe0aee6aa754d3bbb56e76840f4ee1c1.zip
clean up logging for creating and updating the db
git-svn-id: https://svn.musicpd.org/mpd/trunk@235 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r--src/directory.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/directory.c b/src/directory.c
index 90d1b622d..64384a1a4 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -115,8 +115,9 @@ void freeDirectoryList(DirectoryList * directoryList) {
void removeSongFromDirectory(Directory * directory, char * shortname) {
void * song;
-
+
if(findInList(directory->songs,shortname,&song)) {
+ LOG("removing: %s\n",((Song *)song)->utf8file);
removeASongFromTables((Song *)song);
deleteASongFromPlaylist((Song *)song);
deleteFromList(directory->songs,shortname);
@@ -148,7 +149,6 @@ int updateInDirectory(Directory * directory, char * shortname, char * name) {
if((mtime = isMusic(name))) {
if(0==findInList(directory->songs,shortname,&song)) {
- LOG("adding %s\n",name);
addToDirectory(directory,shortname,name);
}
else if(mtime>((Song *)song)->mtime) {
@@ -205,10 +205,12 @@ int removeDeletedFromDirectory(Directory * directory) {
tmpNode = node->nextNode;
if(findInList(entList,node->key,&name)) {
if(!isDir((char *)name)) {
+ LOG("removing directory: %s\n",(char*)name);
deleteFromList(directory->subDirectories,node->key);
}
}
else {
+ LOG("removing directory: %s\n",(char*)name);
deleteFromList(directory->subDirectories,node->key);
}
node = tmpNode;
@@ -286,7 +288,7 @@ int exploreDirectory(Directory * directory) {
DEBUG("explore: attempting to opendir: %s\n",dirname);
if((dir = opendir(rmp2amp(utf8ToFsCharset(dirname))))==NULL) return -1;
- LOG("explore: %s\n",dirname);
+ DEBUG("explore: %s\n",dirname);
while((ent = readdir(dir))) {
if(ent->d_name[0]=='.') continue; /* hide hidden stuff */
@@ -325,6 +327,7 @@ int addToDirectory(Directory * directory, char * shortname, char * name) {
return addSubDirectoryToDirectory(directory,shortname,name);
}
else if(isMusic(name)) {
+ LOG("adding %s\n",name);
Song * song;
song = addSongToList(directory->songs,shortname,name);
if(!song) return -1;