diff options
author | Igor Kuzmin <parafin@paraf.in> | 2009-08-19 21:21:29 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-08-19 21:21:29 +0200 |
commit | 9d42f4e0ed81969b4fcf1c20e60e867a2defe636 (patch) | |
tree | e2005c018c84f5ce0e7563ac8b6fdd8c9c42cbb2 /src | |
parent | fd8aa54a90c7e18ab4ff3e4be7bc40e2c475839f (diff) | |
download | mpd-9d42f4e0ed81969b4fcf1c20e60e867a2defe636.tar.gz mpd-9d42f4e0ed81969b4fcf1c20e60e867a2defe636.tar.xz mpd-9d42f4e0ed81969b4fcf1c20e60e867a2defe636.zip |
update: don't re-read unchanged container files
MPD checks if every flac (possibly other types as well) file contains
cuesheet on every update, which produces unneeded I/O. My music
collection is on NFS share, so it's quite noticeable. IMHO, it
shouldn't re-read unchanged files, so I wrote simple patch to fix it.
Diffstat (limited to 'src')
-rw-r--r-- | src/update.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/update.c b/src/update.c index bdf84ce36..593198cb9 100644 --- a/src/update.c +++ b/src/update.c @@ -502,7 +502,8 @@ update_regular_file(struct directory *directory, { struct song* song = songvec_find(&directory->songs, name); - if (plugin->container_scan != NULL) + if (!(song != NULL && st->st_mtime == song->mtime) && + plugin->container_scan != NULL) { if (update_container_file(directory, name, st, plugin)) { |