Improve plugin state action

Add options to check for ...
 * Initial plugin start
 * Plugin restart
 * Scene collection change
This commit is contained in:
WarmUpTill
2022-12-24 01:38:01 +01:00
committed by WarmUpTill
parent e147402250
commit 4eafbb8f18
5 changed files with 94 additions and 35 deletions

View File

@@ -151,6 +151,7 @@ void SwitcherData::Thread()
std::chrono::milliseconds duration;
auto startTime = std::chrono::high_resolution_clock::now();
auto endTime = std::chrono::high_resolution_clock::now();
switcher->firstIntervalAfterStop = true;
while (true) {
std::unique_lock<std::mutex> lock(m);
@@ -251,6 +252,8 @@ void SwitcherData::Thread()
}
writeSceneInfoToFile();
switcher->firstInterval = false;
switcher->firstIntervalAfterStop = false;
}
blog(LOG_INFO, "stopped");