Booth support
This commit is contained in:
+10
-1
@@ -1,4 +1,5 @@
|
||||
import { Counter } from './models/counter';
|
||||
import {Counter} from './models/counter';
|
||||
|
||||
export function IDToCode(id: number) {
|
||||
const padded = _.padStart(id.toString(), 8);
|
||||
return `${padded.slice(0, 4)}-${padded.slice(4)}`;
|
||||
@@ -12,3 +13,11 @@ export async function GetCounter(key: string) {
|
||||
)
|
||||
).docs[0].value;
|
||||
}
|
||||
|
||||
export function getVersion(info: EamuseInfo) {
|
||||
const dateCode = parseInt(info.model.split(":")[4]);
|
||||
if (dateCode <= 2013052900) return 1;
|
||||
if (info.method.startsWith('sv4')) return 4;
|
||||
if (info.method.startsWith('sv5')) return 5;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user