Skip to content

Commit

Permalink
fix: more robust schedule parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
mint-dewit committed Oct 24, 2020
1 parent fdc5c82 commit 859e38c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "folderplayout",
"version": "0.6.2",
"version": "0.6.3",
"author": "Balte de Wit <contact@balte.nl>",
"description": "A scheduled playout client for CasparCG.",
"license": "MIT",
Expand Down Expand Up @@ -61,7 +61,7 @@
"axios": "^0.18.0",
"bootstrap": "^4.4.1",
"bootstrap-vue": "^2.15.0",
"recurrence-parser": "^0.5.2",
"recurrence-parser": "^0.5.3",
"superfly-timeline": "^8.0.0",
"timeline-state-resolver": "^3.20.1",
"uid": "^0.0.2",
Expand Down Expand Up @@ -122,4 +122,4 @@
"webpack-hot-middleware": "^2.22.2",
"webpack-merge": "^4.1.3"
}
}
}
11 changes: 8 additions & 3 deletions src/main/playout.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,14 @@ export class PlayoutManager {

let tries = 0
while (time < stopCondition && tries < 1000 && this.API.playoutSchedule.length > 0) {
const tl = this.parser.getNextTimeline(new DateObj(time))
tls.push(tl)
time = tl.end + 1000
try {
const tl = this.parser.getNextTimeline(new DateObj(time))
tls.push(tl)
time = tl.end + 1000
} catch (e) {
console.log(e) // do something here
return
}
tries++
}

Expand Down
14 changes: 10 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8567,13 +8567,14 @@ rechoir@^0.6.2:
dependencies:
resolve "^1.1.6"

recurrence-parser@^0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/recurrence-parser/-/recurrence-parser-0.5.2.tgz#d53d8d9c0c3449197e92097f07fecf44d7cb5d37"
integrity sha512-8aAfdBtUC0Guws/A2MweWKXo/IuMb51NbWNm5o3cOsdnFhX5JO4fVKae3y29YwSIfOpc6F1vRdGkMSa91MsS/g==
recurrence-parser@^0.5.3:
version "0.5.3"
resolved "https://registry.yarnpkg.com/recurrence-parser/-/recurrence-parser-0.5.3.tgz#0de69811e5b4a4774f524460129c8f46aa43c2fd"
integrity sha512-HAxq8qW1+jDkoB+s9Eo13pvm88fTML871hTwIeQkt8cpv5k4b0bSsNwFdvACh30mnOustIh4HQXyIxhat0P+xQ==
dependencies:
superfly-timeline "^7.3.1"
tslib "^1.9.0"
yargs-parser "*"

redent@^1.0.0:
version "1.0.0"
Expand Down Expand Up @@ -10992,6 +10993,11 @@ yallist@^4.0.0:
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==

yargs-parser@*:
version "20.2.3"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.3.tgz#92419ba867b858c868acf8bae9bf74af0dd0ce26"
integrity sha512-emOFRT9WVHw03QSvN5qor9QQT9+sw5vwxfYweivSMHTcAXPefwVae2FjO7JJjj8hCE4CzPOPeFM83VwT29HCww==

yargs-parser@^13.1.2:
version "13.1.2"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38"
Expand Down

0 comments on commit 859e38c

Please sign in to comment.