mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 04:43:35 +00:00
Hotfix/4.0.0 (#48)
* validate time string * handle time entered in seconds * fix: id in delays and blocks
This commit is contained in:
+4
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ontime",
|
||||
"version": "0.3.2",
|
||||
"version": "0.4.1",
|
||||
"author": "Carlos Valente",
|
||||
"description": "Time keeping for live events",
|
||||
"repository": "https://github.com/cpvalente/ontime",
|
||||
@@ -25,6 +25,9 @@
|
||||
},
|
||||
"scripts": {
|
||||
"nodestart": "NODE_ENV=development node src/app.js",
|
||||
"setdb": "cp data/db.json src/data/db.json",
|
||||
"clean": "rm -rf ../client/build/ && rm -rf ../client/node_modules && rm -rf src/node_modules && rm -rf ./node_modules && rm -rf ./dist",
|
||||
"prep": "yarn clean && yarn prep",
|
||||
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
||||
"start": "NODE_ENV=development electron .",
|
||||
"pack": "electron-builder --dir",
|
||||
|
||||
@@ -34,7 +34,6 @@ import ua from 'universal-analytics';
|
||||
let isValid = validateFile(file);
|
||||
|
||||
if (isValid) {
|
||||
console.log('reading this');
|
||||
// Read data from JSON file, this will set db.data content
|
||||
await db.read();
|
||||
}
|
||||
|
||||
@@ -227,10 +227,14 @@ export const parseJsonv1 = async (jsonData) => {
|
||||
numEntries++;
|
||||
}
|
||||
} else if (e.type === 'delay') {
|
||||
events.push({ ...delayDef, duration: e.duration });
|
||||
events.push({
|
||||
...delayDef,
|
||||
duration: e.duration,
|
||||
id: e.id || generateId(),
|
||||
});
|
||||
numEntries++;
|
||||
} else if (e.type === 'block') {
|
||||
events.push({ ...blockDef });
|
||||
events.push({ ...blockDef, id: e.id || generateId() });
|
||||
numEntries++;
|
||||
} else {
|
||||
console.log('ERROR: undefined event type, skipping');
|
||||
|
||||
Reference in New Issue
Block a user