Merge branch 'master' into wip/migratedb

This commit is contained in:
cv
2021-05-28 14:46:54 +02:00
27 changed files with 284 additions and 110 deletions
+7 -2
View File
@@ -5,6 +5,9 @@ export const initiateOSC = (config) => {
console.log(`OSC Server is listening on port ${config.port}`);
});
// error
oscServer.on('error', console.error);
oscServer.on('message', function (msg) {
// message should look like /ontime/{path}/{args} where
// ontime: fixed message for app
@@ -62,7 +65,8 @@ export const initiateOSC = (config) => {
console.log('calling goto with', args);
try {
let eventIndex = parseInt(args);
if (isNaN(eventIndex) || eventIndex <= 0) return;
if (isNaN(eventIndex) || eventIndex <= 0 || eventIndex == null)
return;
global.timer.loadEvent(eventIndex - 1, undefined, true);
} catch (error) {
console.log('error calling goto: ', error);
@@ -70,8 +74,9 @@ export const initiateOSC = (config) => {
break;
case 'gotoid':
console.log('calling gotoid with', args);
if (args == null) return;
try {
global.timer.loadEventById(args.toLowerCase());
global.timer.loadEventById(args.toString().toLowerCase());
} catch (error) {
console.log('error calling goto: ', error);
}