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:
parent
fd8aa54a90
commit
9d42f4e0ed
1
NEWS
1
NEWS
|
@ -1,6 +1,7 @@
|
||||||
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,
|
||||||
{
|
{
|
||||||
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))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue