0.16.1-2 Installer Fix
This commit is contained in:
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ripster-frontend",
|
||||
"version": "0.16.1-1",
|
||||
"version": "0.16.1-2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ripster-frontend",
|
||||
"version": "0.16.1-1",
|
||||
"version": "0.16.1-2",
|
||||
"dependencies": {
|
||||
"primeicons": "^7.0.0",
|
||||
"primereact": "^10.9.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ripster-frontend",
|
||||
"version": "0.16.1-1",
|
||||
"version": "0.16.1-2",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
+35
-2
@@ -36,6 +36,17 @@ function normalizeStage(value) {
|
||||
return String(value || '').trim().toUpperCase();
|
||||
}
|
||||
|
||||
function isRunningStage(value) {
|
||||
const normalized = normalizeStage(value);
|
||||
return normalized === 'ANALYZING'
|
||||
|| normalized === 'RIPPING'
|
||||
|| normalized === 'MEDIAINFO_CHECK'
|
||||
|| normalized === 'ENCODING'
|
||||
|| normalized === 'CD_ANALYZING'
|
||||
|| normalized === 'CD_RIPPING'
|
||||
|| normalized === 'CD_ENCODING';
|
||||
}
|
||||
|
||||
function isTerminalStage(value) {
|
||||
const normalized = normalizeStage(value);
|
||||
return normalized === 'FINISHED' || normalized === 'ERROR' || normalized === 'CANCELLED';
|
||||
@@ -315,17 +326,24 @@ function App() {
|
||||
const isCdProgressStage = progressStage === 'CD_ANALYZING'
|
||||
|| progressStage === 'CD_RIPPING'
|
||||
|| progressStage === 'CD_ENCODING';
|
||||
const incomingIsRunning = isRunningStage(progressStage);
|
||||
const incomingIsTerminal = isTerminalStage(progressStage);
|
||||
const prevActiveJobId = normalizeJobId(prev?.activeJobId || prev?.context?.jobId);
|
||||
const prevJobProgress = normalizedProgressJobId
|
||||
? (prev?.jobProgress?.[normalizedProgressJobId] || null)
|
||||
: null;
|
||||
const prevJobProgressState = normalizeStage(prevJobProgress?.state);
|
||||
const prevJobProgressIsRunning = isRunningStage(prevJobProgressState);
|
||||
const prevJobProgressIsTerminal = isTerminalStage(prevJobProgressState);
|
||||
const matchingCdDriveEntry = normalizedProgressJobId
|
||||
? Object.values(prev?.cdDrives || {}).find((driveState) => normalizeJobId(driveState?.jobId) === normalizedProgressJobId)
|
||||
: null;
|
||||
const matchingCdDriveState = normalizeStage(matchingCdDriveEntry?.state);
|
||||
const matchingCdDriveIsRunning = isRunningStage(matchingCdDriveState);
|
||||
const matchingCdDriveIsTerminal = isTerminalStage(matchingCdDriveEntry?.state);
|
||||
const previousGlobalStage = normalizeStage(prev?.state);
|
||||
const previousGlobalIsRunning = isRunningStage(previousGlobalStage);
|
||||
const previousGlobalIsTerminal = isTerminalStage(previousGlobalStage);
|
||||
const hasKnownBinding = Boolean(
|
||||
normalizedProgressJobId
|
||||
&& (
|
||||
@@ -334,9 +352,24 @@ function App() {
|
||||
|| matchingCdDriveEntry
|
||||
)
|
||||
);
|
||||
const regressesStableJobState = Boolean(
|
||||
normalizedProgressJobId
|
||||
&& incomingIsRunning
|
||||
&& (
|
||||
(prevJobProgressState && !prevJobProgressIsRunning && !prevJobProgressIsTerminal)
|
||||
|| (matchingCdDriveState && !matchingCdDriveIsRunning && !matchingCdDriveIsTerminal)
|
||||
|| (
|
||||
prevActiveJobId === normalizedProgressJobId
|
||||
&& previousGlobalStage
|
||||
&& !previousGlobalIsRunning
|
||||
&& !previousGlobalIsTerminal
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Ignore late/stale progress packets that arrive after a terminal state
|
||||
// or for jobs that are no longer bound in pipeline state.
|
||||
// or regress a job from an interactive/ready state back into an
|
||||
// earlier running stage because an older progress packet arrived late.
|
||||
if (
|
||||
normalizedProgressJobId
|
||||
&& !incomingIsTerminal
|
||||
@@ -344,6 +377,7 @@ function App() {
|
||||
prevJobProgressIsTerminal
|
||||
|| matchingCdDriveIsTerminal
|
||||
|| !hasKnownBinding
|
||||
|| regressesStableJobState
|
||||
)
|
||||
) {
|
||||
return prev;
|
||||
@@ -376,7 +410,6 @@ function App() {
|
||||
};
|
||||
}
|
||||
if (progressJobId === prev?.activeJobId || progressJobId == null) {
|
||||
const previousGlobalStage = normalizeStage(prev?.state);
|
||||
const keepPreviousGlobalStage = isTerminalStage(previousGlobalStage) && !incomingIsTerminal;
|
||||
next.state = keepPreviousGlobalStage ? prev?.state : (payload.state ?? prev?.state);
|
||||
next.progress = keepPreviousGlobalStage ? prev?.progress : (payload.progress ?? prev?.progress);
|
||||
|
||||
Reference in New Issue
Block a user