Skip to content

Commit 99cfa7d

Browse files
[BDGR-153] Make Ontime version checking more lenient (#253)
1 parent 5b89d99 commit 99cfa7d

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

desktop/src/main/ontime/ontime.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const logger = getLogger("ontime");
77

88
interface OntimeInfo {
99
networkInterfaces: unknown[];
10-
version: number;
10+
version: number | string;
1111
serverPort: number;
1212
osc: unknown;
1313
}
@@ -66,8 +66,14 @@ export class OntimeClient {
6666
{ cause: e },
6767
);
6868
}
69-
if (info.version !== 2) {
70-
throw new Error(`Ontime at ${host} is not version 2`);
69+
if (typeof info.version === "number") {
70+
if (info.version !== 2) {
71+
throw new Error(`Ontime at ${host} is not version 2`);
72+
}
73+
} else {
74+
if (info.version[0] !== "2") {
75+
throw new Error(`Ontime at ${host} is not version 2`);
76+
}
7177
}
7278
const result = new OntimeClient(host);
7379
result.got = client;

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ services:
6060
]
6161

6262
ontime:
63-
image: getontime/ontime:v2.3.9
63+
image: getontime/ontime:v2.28.17
6464
ports:
6565
- "4001:4001"
6666
volumes:

0 commit comments

Comments
 (0)