|
@@ -583,22 +583,24 @@ jQuery(document).ready(function () {
|
|
|
$statusInfo = array_reduce($returnValues, function ($ret, $encoderSummaryLine) {
|
|
$statusInfo = array_reduce($returnValues, function ($ret, $encoderSummaryLine) {
|
|
|
DBG::log([$ret, $encoderSummaryLine], 'array', "DBG reduce [\$ret, \$encoderSummaryLine]");
|
|
DBG::log([$ret, $encoderSummaryLine], 'array', "DBG reduce [\$ret, \$encoderSummaryLine]");
|
|
|
$matches = [];
|
|
$matches = [];
|
|
|
- preg_match_all('/(\d+) files, (\d+) processed, (\d+) errors/', $encoderSummaryLine, $matches, PREG_SET_ORDER, 0);
|
|
|
|
|
|
|
+ preg_match_all('/(\d+) files, (\d+) encoded, (\d+) skipped, (\d+) errors/', $encoderSummaryLine, $matches, PREG_SET_ORDER, 0);
|
|
|
return [
|
|
return [
|
|
|
'files' => $ret['files'] + (int)$matches[0][1],
|
|
'files' => $ret['files'] + (int)$matches[0][1],
|
|
|
- 'processed' => $ret['processed'] + (int)$matches[0][2],
|
|
|
|
|
- 'errors' => $ret['errors'] + (int)$matches[0][3],
|
|
|
|
|
|
|
+ 'encoded' => $ret['encoded'] + (int)$matches[0][2],
|
|
|
|
|
+ 'skipped' => $ret['skipped'] + (int)$matches[0][3],
|
|
|
|
|
+ 'errors' => $ret['errors'] + (int)$matches[0][4],
|
|
|
];
|
|
];
|
|
|
}, [
|
|
}, [
|
|
|
'files' => 0,
|
|
'files' => 0,
|
|
|
- 'processed' => 0,
|
|
|
|
|
|
|
+ 'encoded' => 0,
|
|
|
|
|
+ 'skipped' => 0,
|
|
|
'errors' => 0,
|
|
'errors' => 0,
|
|
|
]);
|
|
]);
|
|
|
if ($statusInfo['errors'] === 0 && $statusInfo['files'] > 0) {
|
|
if ($statusInfo['errors'] === 0 && $statusInfo['files'] > 0) {
|
|
|
- if ($dbg) UI::alert('success', "{$statusInfo['files']} files, {$statusInfo['processed']} processed, {$statusInfo['errors']} errors");
|
|
|
|
|
|
|
+ if ($dbg) UI::alert('success', "{$statusInfo['files']} files, {$statusInfo['encoded']} encoded, {$statusInfo['skipped']} skipped, {$statusInfo['errors']} errors");
|
|
|
} else {
|
|
} else {
|
|
|
- if ($dbg) UI::alert('danger', "{$statusInfo['files']} files, {$statusInfo['processed']} processed, {$statusInfo['errors']} errors");
|
|
|
|
|
- else throw new Exception("{$statusInfo['files']} files, {$statusInfo['processed']} processed, {$statusInfo['errors']} errors");
|
|
|
|
|
|
|
+ if ($dbg) UI::alert('danger', "{$statusInfo['files']} files, {$statusInfo['encoded']} encoded, {$statusInfo['skipped']} skipped, {$statusInfo['errors']} errors");
|
|
|
|
|
+ else throw new Exception("{$statusInfo['files']} files, {$statusInfo['encoded']} encoded, {$statusInfo['skipped']} skipped, {$statusInfo['errors']} errors");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -639,22 +641,24 @@ jQuery(document).ready(function () {
|
|
|
$statusInfo = array_reduce($returnValues, function ($ret, $encoderSummaryLine) {
|
|
$statusInfo = array_reduce($returnValues, function ($ret, $encoderSummaryLine) {
|
|
|
DBG::log([$ret, $encoderSummaryLine], 'array', "DBG reduce [\$ret, \$encoderSummaryLine]");
|
|
DBG::log([$ret, $encoderSummaryLine], 'array', "DBG reduce [\$ret, \$encoderSummaryLine]");
|
|
|
$matches = [];
|
|
$matches = [];
|
|
|
- preg_match_all('/(\d+) files, (\d+) processed, (\d+) errors/', $encoderSummaryLine, $matches, PREG_SET_ORDER, 0);
|
|
|
|
|
|
|
+ preg_match_all('/(\d+) files, (\d+) encoded, (\d+) skipped, (\d+) errors/', $encoderSummaryLine, $matches, PREG_SET_ORDER, 0);
|
|
|
return [
|
|
return [
|
|
|
'files' => $ret['files'] + (int)$matches[0][1],
|
|
'files' => $ret['files'] + (int)$matches[0][1],
|
|
|
- 'processed' => $ret['processed'] + (int)$matches[0][2],
|
|
|
|
|
- 'errors' => $ret['errors'] + (int)$matches[0][3],
|
|
|
|
|
|
|
+ 'encoded' => $ret['encoded'] + (int)$matches[0][2],
|
|
|
|
|
+ 'skipped' => $ret['skipped'] + (int)$matches[0][3],
|
|
|
|
|
+ 'errors' => $ret['errors'] + (int)$matches[0][4],
|
|
|
];
|
|
];
|
|
|
}, [
|
|
}, [
|
|
|
'files' => 0,
|
|
'files' => 0,
|
|
|
- 'processed' => 0,
|
|
|
|
|
|
|
+ 'encoded' => 0,
|
|
|
|
|
+ 'skipped' => 0,
|
|
|
'errors' => 0,
|
|
'errors' => 0,
|
|
|
]);
|
|
]);
|
|
|
if ($statusInfo['errors'] === 0 && $statusInfo['files'] > 0) {
|
|
if ($statusInfo['errors'] === 0 && $statusInfo['files'] > 0) {
|
|
|
- if ($dbg) UI::alert('success', "{$statusInfo['files']} files, {$statusInfo['processed']} processed, {$statusInfo['errors']} errors");
|
|
|
|
|
|
|
+ if ($dbg) UI::alert('success', "{$statusInfo['files']} files, {$statusInfo['encoded']} encoded, {$statusInfo['skipped']} skipped, {$statusInfo['errors']} errors");
|
|
|
} else {
|
|
} else {
|
|
|
- if ($dbg) UI::alert('danger', "{$statusInfo['files']} files, {$statusInfo['processed']} processed, {$statusInfo['errors']} errors");
|
|
|
|
|
- else throw new Exception("{$statusInfo['files']} files, {$statusInfo['processed']} processed, {$statusInfo['errors']} errors");
|
|
|
|
|
|
|
+ if ($dbg) UI::alert('danger', "{$statusInfo['files']} files, {$statusInfo['encoded']} encoded, {$statusInfo['skipped']} skipped, {$statusInfo['errors']} errors");
|
|
|
|
|
+ else throw new Exception("{$statusInfo['files']} files, {$statusInfo['encoded']} encoded, {$statusInfo['skipped']} skipped, {$statusInfo['errors']} errors");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|