mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-15 00:35:55 -04:00
[library] Decrease library update delay and clarify purpose
This commit is contained in:
parent
9f11a69c79
commit
e7e2b2c9a6
@ -77,11 +77,16 @@ static bool scan_exit;
|
|||||||
/* Flag for scan in progress */
|
/* Flag for scan in progress */
|
||||||
static bool scanning;
|
static bool scanning;
|
||||||
|
|
||||||
// After being told by db that the library was updated through update_trigger(),
|
// After being told by db that the library was updated through
|
||||||
// wait 60 seconds before notifying listeners of LISTENER_DATABASE. This is to
|
// library_update_trigger(), wait 5 seconds before notifying listeners
|
||||||
// avoid bombarding the listeners while there are many db updates, and to make
|
// of LISTENER_DATABASE. This is to catch bulk updates like automated
|
||||||
// sure they only get a single update (useful for the cache).
|
// tag editing, music file imports/renames. This way multiple updates
|
||||||
static struct timeval library_update_wait = { 60, 0 };
|
// are collected for a single update notification (useful to avoid
|
||||||
|
// repeated library reads from clients).
|
||||||
|
//
|
||||||
|
// Note: this update delay does not apply to library scans. The scans
|
||||||
|
// use the flag `scanning` for deferring update notifcations.
|
||||||
|
static struct timeval library_update_wait = { 5, 0 };
|
||||||
static struct event *updateev;
|
static struct event *updateev;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user