aboutsummaryrefslogtreecommitdiffstats
path: root/src/update_walk.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-05 08:01:29 +0100
committerMax Kellermann <max@duempel.org>2009-11-05 08:01:29 +0100
commit4ec25b5d64bca0f13f5b914b8f50f1f0eb4e7662 (patch)
treedd78b1479da810e5f8e8ae5c3c41bf7bb68e9a89 /src/update_walk.c
parente96dc9a14ceae8f9ccc3a25c9cd92301be2aeff3 (diff)
downloadmpd-4ec25b5d64bca0f13f5b914b8f50f1f0eb4e7662.tar.gz
mpd-4ec25b5d64bca0f13f5b914b8f50f1f0eb4e7662.tar.xz
mpd-4ec25b5d64bca0f13f5b914b8f50f1f0eb4e7662.zip
update_walk: log unrecognized files
When a song's tags could not be loaded during database update, log this as a debug message. Same for a song being removed because its updated tag could not be read.
Diffstat (limited to 'src/update_walk.c')
-rw-r--r--src/update_walk.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/update_walk.c b/src/update_walk.c
index 68ebbedeb..aa01ca826 100644
--- a/src/update_walk.c
+++ b/src/update_walk.c
@@ -530,8 +530,11 @@ update_regular_file(struct directory *directory,
if (song == NULL) {
song = song_file_load(name, directory);
- if (song == NULL)
+ if (song == NULL) {
+ g_debug("ignoring unrecognized file %s/%s",
+ directory_get_path(directory), name);
return;
+ }
songvec_add(&directory->songs, song);
modified = true;
@@ -540,8 +543,12 @@ update_regular_file(struct directory *directory,
} else if (st->st_mtime != song->mtime || walk_discard) {
g_message("updating %s/%s",
directory_get_path(directory), name);
- if (!song_file_update(song))
+ if (!song_file_update(song)) {
+ g_debug("deleting unrecognized file %s/%s",
+ directory_get_path(directory), name);
delete_song(directory, song);
+ }
+
modified = true;
}
#ifdef ENABLE_ARCHIVE