Commit 9d42f4e0 authored by Igor Kuzmin's avatar Igor Kuzmin Committed by Max Kellermann

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.
parent fd8aa54a
ver 0.15.3 (2009/??/??) ver 0.15.3 (2009/??/??)
* output: * output:
- fix stuttering due to uninitialized variable - fix stuttering due to uninitialized variable
* update: don't re-read unchanged container files
ver 0.15.2 (2009/08/15) ver 0.15.2 (2009/08/15)
......
...@@ -502,7 +502,8 @@ update_regular_file(struct directory *directory, ...@@ -502,7 +502,8 @@ update_regular_file(struct directory *directory,
{ {
struct song* song = songvec_find(&directory->songs, name); 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)) if (update_container_file(directory, name, st, plugin))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment