media library/tag editor: block idle while doing hierarchical searches

idle should be blocked in such cases since it would be enabled and
disabled a few times by each mpd command, which makes no sense and
slows down the whole process.
This commit is contained in:
Andrzej Rybczak
2010-06-17 16:41:49 +02:00
parent 10cea746e9
commit 9c02bbf596
4 changed files with 17 additions and 3 deletions

View File

@@ -95,6 +95,7 @@ namespace MPD
unsigned Version() const;
void SetIdleEnabled(bool val) { isIdleEnabled = val; }
void BlockIdle(bool val) { itsIdleBlocked = val; }
bool SupportsIdle() const { return supportsIdle; }
void OrderDataFetching() { hasData = 1; }
int GetFD() const { return itsFD; }
@@ -227,6 +228,7 @@ namespace MPD
int itsFD;
bool isIdle;
bool isIdleEnabled;
bool itsIdleBlocked;
bool supportsIdle;
bool hasData;