mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
@@ -1606,15 +1606,15 @@ Duration=${duration} `
|
||||
* to be confident we have some time before the say verb is executed, and the Config
|
||||
* does not give us that confidence since it returns immediately.
|
||||
*/
|
||||
const allTasks = (this.tasks || []).concat(newTasks);
|
||||
const skipFirst = allTasks.slice(1);
|
||||
const idxFirstNotConfig = skipFirst.findIndex((t) => t.name !== TaskName.Config);
|
||||
const haveQueuedNonConfig = this.tasks.findIndex((t) => t.name !== TaskName.Config) !== -1;
|
||||
let tasks = haveQueuedNonConfig ? newTasks : [];
|
||||
if (!haveQueuedNonConfig) {
|
||||
const idxFirstNotConfig = newTasks.findIndex((t) => t.name !== TaskName.Config);
|
||||
if (-1 === idxFirstNotConfig) return;
|
||||
tasks = newTasks.slice(idxFirstNotConfig + 1);
|
||||
}
|
||||
|
||||
const allTasksAfterFirstNotConfig = skipFirst.slice(idxFirstNotConfig);
|
||||
|
||||
|
||||
for (const task of allTasksAfterFirstNotConfig) {
|
||||
for (const task of tasks) {
|
||||
if (task.name === TaskName.Config && task.hasSynthesizer) {
|
||||
/* if they change synthesizer settings don't try to precache */
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user