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.
This commit is contained in:
Igor Kuzmin
2009-08-19 21:21:29 +02:00
committed by Max Kellermann
parent fd8aa54a90
commit 9d42f4e0ed
2 changed files with 3 additions and 1 deletions

View File

@@ -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))
{