DVD Integration

This commit is contained in:
2026-03-06 11:21:25 +00:00
parent 3abb53fb8e
commit e1a87af16a
20 changed files with 2900 additions and 697 deletions

View File

@@ -32,16 +32,13 @@ function parseEta(line) {
function parseMakeMkvProgress(line) {
const prgv = line.match(/PRGV:(\d+),(\d+),(\d+)/);
if (prgv) {
const a = Number(prgv[1]);
const b = Number(prgv[2]);
const c = Number(prgv[3]);
// Format: PRGV:current,total,max (official makemkv docs)
// progress = current / max
const current = Number(prgv[1]);
const max = Number(prgv[3]);
if (c > 0) {
return { percent: clampPercent((a / c) * 100), eta: null };
}
if (b > 0) {
return { percent: clampPercent((a / b) * 100), eta: null };
if (max > 0) {
return { percent: clampPercent((current / max) * 100), eta: null };
}
}