0.10.2-22 History/Downloads

This commit is contained in:
2026-03-17 14:28:29 +00:00
parent cdb87b5759
commit ac91d83c45
10 changed files with 210 additions and 65 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "ripster-backend", "name": "ripster-backend",
"version": "0.10.2-21", "version": "0.10.2-22",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "ripster-backend", "name": "ripster-backend",
"version": "0.10.2-21", "version": "0.10.2-22",
"dependencies": { "dependencies": {
"archiver": "^7.0.1", "archiver": "^7.0.1",
"cors": "^2.8.5", "cors": "^2.8.5",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "ripster-backend", "name": "ripster-backend",
"version": "0.10.2-21", "version": "0.10.2-22",
"private": true, "private": true,
"type": "commonjs", "type": "commonjs",
"scripts": { "scripts": {
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "ripster-frontend", "name": "ripster-frontend",
"version": "0.10.2-21", "version": "0.10.2-22",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "ripster-frontend", "name": "ripster-frontend",
"version": "0.10.2-21", "version": "0.10.2-22",
"dependencies": { "dependencies": {
"primeicons": "^7.0.0", "primeicons": "^7.0.0",
"primereact": "^10.9.2", "primereact": "^10.9.2",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "ripster-frontend", "name": "ripster-frontend",
"version": "0.10.2-21", "version": "0.10.2-22",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
+1 -9
View File
@@ -389,15 +389,6 @@ function App() {
outlined={location.pathname !== item.path} outlined={location.pathname !== item.path}
/> />
))} ))}
<button
type="button"
className={`zip-status-indicator ${downloadIndicator.className}`}
onClick={() => navigate('/downloads')}
title="Downloads-Seite oeffnen"
>
<i className={downloadIndicator.icon} aria-hidden="true" />
<span>{downloadIndicator.label}</span>
</button>
</div> </div>
</header> </header>
@@ -471,6 +462,7 @@ function App() {
jobsRefreshToken={dashboardJobsRefreshToken} jobsRefreshToken={dashboardJobsRefreshToken}
pendingExpandedJobId={pendingDashboardJobId} pendingExpandedJobId={pendingDashboardJobId}
onPendingExpandedJobHandled={handleDashboardJobFocusConsumed} onPendingExpandedJobHandled={handleDashboardJobFocusConsumed}
downloadSummary={downloadSummary}
/> />
} }
/> />
+76 -44
View File
@@ -1,3 +1,5 @@
import { useEffect, useState } from 'react';
import { Link } from 'react-router-dom';
import { Dialog } from 'primereact/dialog'; import { Dialog } from 'primereact/dialog';
import { Button } from 'primereact/button'; import { Button } from 'primereact/button';
import MediaInfoReviewPanel from './MediaInfoReviewPanel'; import MediaInfoReviewPanel from './MediaInfoReviewPanel';
@@ -5,6 +7,7 @@ import blurayIndicatorIcon from '../assets/media-bluray.svg';
import discIndicatorIcon from '../assets/media-disc.svg'; import discIndicatorIcon from '../assets/media-disc.svg';
import otherIndicatorIcon from '../assets/media-other.svg'; import otherIndicatorIcon from '../assets/media-other.svg';
import { getStatusLabel } from '../utils/statusPresentation'; import { getStatusLabel } from '../utils/statusPresentation';
import { api } from '../api/client';
const CD_FORMAT_LABELS = { const CD_FORMAT_LABELS = {
flac: 'FLAC', flac: 'FLAC',
@@ -478,6 +481,15 @@ export default function JobDetailDialog({
deleteEntryBusy = false, deleteEntryBusy = false,
downloadBusyTarget = null downloadBusyTarget = null
}) { }) {
const [expertMode, setExpertMode] = useState(false);
useEffect(() => {
api.getSettings().then((res) => {
const allSettings = (res?.categories || []).flatMap((c) => c.settings || []);
const val = allSettings.find((s) => s.key === 'ui_expert_mode')?.value;
setExpertMode(val === 'true' || val === true);
}).catch(() => {});
}, []);
const mkDone = Boolean(job?.ripSuccessful) || !job?.makemkvInfo || job?.makemkvInfo?.status === 'SUCCESS'; const mkDone = Boolean(job?.ripSuccessful) || !job?.makemkvInfo || job?.makemkvInfo?.status === 'SUCCESS';
const running = ['ANALYZING', 'RIPPING', 'MEDIAINFO_CHECK', 'ENCODING'].includes(job?.status); const running = ['ANALYZING', 'RIPPING', 'MEDIAINFO_CHECK', 'ENCODING'].includes(job?.status);
const showFinalLog = !running; const showFinalLog = !running;
@@ -579,7 +591,7 @@ export default function JobDetailDialog({
modal modal
> >
{!job ? null : ( {!job ? null : (
<> <div className="job-detail-body">
{detailLoading ? <p>Details werden geladen ...</p> : null} {detailLoading ? <p>Details werden geladen ...</p> : null}
<div className="job-head-row"> <div className="job-head-row">
@@ -792,33 +804,48 @@ export default function JobDetailDialog({
<strong>Fehler:</strong> {job.error_message} <strong>Fehler:</strong> {job.error_message}
</div> </div>
) : null} ) : null}
{expertMode ? (
<div className="job-meta-col-span-2">
<Link to={`/database?table=jobs&id=${job.id}`} className="job-db-link" onClick={onHide}>
<i className="pi pi-database" /> DB-Eintrag ansehen
</Link>
</div>
) : null}
</div> </div>
</section> </section>
{!isCd && (hasConfiguredSelection || encodePlanUserPreset || executedHandBrakeCommand || job.handbrakeInfo?.preEncodeScripts?.configured > 0 || job.handbrakeInfo?.postEncodeScripts?.configured > 0) ? ( {!isCd && (hasConfiguredSelection || encodePlanUserPreset || job.encodePlan?.minLengthMinutes != null || job.encodePlan?.playlistRecommendation || job.handbrakeInfo?.preEncodeScripts?.configured > 0 || job.handbrakeInfo?.postEncodeScripts?.configured > 0) ? (
<section className="job-meta-block job-meta-block-full"> <section className="job-meta-block job-meta-block-full">
<h4>Encode-Konfiguration</h4> <h4>Encode-Konfiguration</h4>
{(hasConfiguredSelection || encodePlanUserPreset) && !isAudiobook ? ( <div className="job-meta-grid job-meta-grid-compact">
<div className="job-meta-grid job-meta-grid-compact job-meta-encode-config"> {job.encodePlan?.minLengthMinutes != null && !isAudiobook ? (
<div> <div>
<strong>Pre-Skripte:</strong> {configuredSelection.preScripts.length > 0 ? configuredSelection.preScripts.join(', ') : (configuredSelection.preChains.length > 0 ? configuredSelection.preChains.join(', ') : '-')} <strong>Mindestlaufzeit:</strong> {job.encodePlan.minLengthMinutes} Min.
</div> </div>
) : null}
{job.encodePlan?.playlistRecommendation && !isAudiobook ? (
<div> <div>
<strong>Post-Skripte:</strong> {configuredSelection.postScripts.length > 0 ? configuredSelection.postScripts.join(', ') : (configuredSelection.postChains.length > 0 ? configuredSelection.postChains.join(', ') : '-')} <strong>Playlist-Auswahl:</strong>{' '}
{job.encodePlan.playlistRecommendation.playlistFile || '-'}
{job.encodePlan.playlistRecommendation.reason ? `${job.encodePlan.playlistRecommendation.reason}` : ''}
</div> </div>
{encodePlanUserPreset ? ( ) : null}
<div className="job-meta-col-span-2"> {(hasConfiguredSelection || encodePlanUserPreset) && !isAudiobook ? (
<strong>Preset:</strong> {encodePlanUserPreset.name || '-'}{encodePlanUserPreset.handbrakePreset ? ` · ${encodePlanUserPreset.handbrakePreset}` : ''}{encodePlanUserPreset.extraArgs ? ` · ${encodePlanUserPreset.extraArgs}` : ''} <>
<div>
<strong>Pre-Skripte:</strong> {configuredSelection.preScripts.length > 0 ? configuredSelection.preScripts.join(', ') : (configuredSelection.preChains.length > 0 ? configuredSelection.preChains.join(', ') : '-')}
</div> </div>
) : null} <div>
</div> <strong>Post-Skripte:</strong> {configuredSelection.postScripts.length > 0 ? configuredSelection.postScripts.join(', ') : (configuredSelection.postChains.length > 0 ? configuredSelection.postChains.join(', ') : '-')}
) : null} </div>
{executedHandBrakeCommand ? ( {encodePlanUserPreset ? (
<div className="handbrake-command-preview"> <div className="job-meta-col-span-2">
<small><strong>{isAudiobook ? 'FFmpeg' : 'HandBrakeCLI'}:</strong></small> <strong>Preset:</strong> {encodePlanUserPreset.name || '-'}{encodePlanUserPreset.handbrakePreset ? ` · ${encodePlanUserPreset.handbrakePreset}` : ''}{encodePlanUserPreset.extraArgs ? ` · ${encodePlanUserPreset.extraArgs}` : ''}
<pre>{executedHandBrakeCommand}</pre> </div>
</div> ) : null}
) : null} </>
) : null}
</div>
{!isAudiobook && (job.handbrakeInfo?.preEncodeScripts?.configured > 0 || job.handbrakeInfo?.postEncodeScripts?.configured > 0) ? ( {!isAudiobook && (job.handbrakeInfo?.preEncodeScripts?.configured > 0 || job.handbrakeInfo?.postEncodeScripts?.configured > 0) ? (
<div className="script-results-grid"> <div className="script-results-grid">
<ScriptSummarySection title="Pre-Encode" summary={job.handbrakeInfo?.preEncodeScripts} /> <ScriptSummarySection title="Pre-Encode" summary={job.handbrakeInfo?.preEncodeScripts} />
@@ -828,32 +855,37 @@ export default function JobDetailDialog({
</section> </section>
) : null} ) : null}
<div className="job-json-grid"> <section className="job-meta-block job-meta-block-full">
{!isCd && !isAudiobook ? <JsonView title="OMDb Info" value={job.omdbInfo} /> : null} <h4>Rohdaten</h4>
<JsonView title={isCd ? 'cdparanoia Info' : (isAudiobook ? 'Audiobook Info' : 'MakeMKV Info')} value={job.makemkvInfo} /> <div className="job-json-grid">
{!isCd && !isAudiobook ? <JsonView title="Mediainfo Info" value={job.mediainfoInfo} /> : null} {!isCd && !isAudiobook ? <JsonView title="OMDb Info" value={job.omdbInfo} /> : null}
<JsonView title={isCd ? 'Rip-Plan' : 'Encode Plan'} value={job.encodePlan} /> <JsonView title={isCd ? 'cdparanoia Info' : (isAudiobook ? 'Audiobook Info' : 'MakeMKV Info')} value={job.makemkvInfo} />
{!isCd ? <JsonView title={isAudiobook ? 'FFmpeg Info' : 'HandBrake Info'} value={job.handbrakeInfo} /> : null} {!isCd && !isAudiobook ? <JsonView title="Mediainfo Info" value={job.mediainfoInfo} /> : null}
</div> <JsonView title={isCd ? 'Rip-Plan' : 'Encode Plan'} value={job.encodePlan} />
{!isCd ? <JsonView title={isAudiobook ? 'FFmpeg Info' : 'HandBrake Info'} value={job.handbrakeInfo} /> : null}
</div>
</section>
{!isCd && !isAudiobook && job.encodePlan ? ( {!isCd && !isAudiobook && Array.isArray(job.encodePlan?.titles) && job.encodePlan.titles.length > 0 ? (
<> <section className="job-meta-block job-meta-block-full">
<h4>Mediainfo-Prüfung (Auswertung)</h4> <h4>Titel</h4>
<MediaInfoReviewPanel <div className="job-titles-list">
review={job.encodePlan} {job.encodePlan.titles.map((t) => {
commandOutputPath={job.output_path || null} const isSelected = t.id === job.encodePlan.encodeInputTitleId || t.selectedForEncode;
selectedEncodeTitleId={reviewSelectedEncodeTitleId} const sizeMb = t.sizeBytes > 0 ? `${(t.sizeBytes / 1024 / 1024).toFixed(0)} MB` : null;
trackSelectionByTitle={reviewTrackSelectionByTitle} return (
availableScripts={configuredSelection.scriptCatalog} <div key={t.id} className={`job-title-row${isSelected ? ' job-title-row-selected' : ''}`}>
availableChains={configuredSelection.chainCatalog} <span className="job-title-id">#{t.id}</span>
preEncodeItems={reviewPreEncodeItems} <span className="job-title-name">{t.fileName || '-'}</span>
postEncodeItems={reviewPostEncodeItems} <span className="job-title-duration">{t.durationMinutes != null ? `${t.durationMinutes} Min.` : '-'}</span>
userPresets={reviewUserPresets} {sizeMb ? <span className="job-title-size">{sizeMb}</span> : null}
selectedUserPresetId={Number.isFinite(encodePlanUserPresetId) && encodePlanUserPresetId > 0 {t.playlistFile ? <span className="job-title-playlist">{t.playlistFile}</span> : null}
? Math.trunc(encodePlanUserPresetId) {isSelected ? <span className="job-title-selected-badge">gewählt</span> : null}
: null} </div>
/> );
</> })}
</div>
</section>
) : null} ) : null}
<h4>Log</h4> <h4>Log</h4>
@@ -1035,7 +1067,7 @@ export default function JobDetailDialog({
/> />
</div> </div>
) : null} ) : null}
</> </div>
)} )}
</Dialog> </Dialog>
); );
+24 -2
View File
@@ -821,7 +821,8 @@ export default function DashboardPage({
onAudiobookUpload, onAudiobookUpload,
jobsRefreshToken, jobsRefreshToken,
pendingExpandedJobId, pendingExpandedJobId,
onPendingExpandedJobHandled onPendingExpandedJobHandled,
downloadSummary = null
}) { }) {
const navigate = useNavigate(); const navigate = useNavigate();
const [busy, setBusy] = useState(false); const [busy, setBusy] = useState(false);
@@ -2694,7 +2695,7 @@ export default function DashboardPage({
</div> </div>
</Card> </Card>
<Card title="Skript- / Cron-Status"> <Card title="Automatisierung">
<div className="runtime-activity-meta pipeline-queue-meta"> <div className="runtime-activity-meta pipeline-queue-meta">
<Tag value={`Laufend: ${runtimeActiveItems.length}`} severity={runtimeActiveItems.length > 0 ? 'warning' : 'success'} /> <Tag value={`Laufend: ${runtimeActiveItems.length}`} severity={runtimeActiveItems.length > 0 ? 'warning' : 'success'} />
<Tag value={`Zuletzt: ${runtimeRecentItems.length}`} severity="info" /> <Tag value={`Zuletzt: ${runtimeRecentItems.length}`} severity="info" />
@@ -2852,6 +2853,27 @@ export default function DashboardPage({
</div> </div>
</div> </div>
)} )}
<div className="dashboard-downloads-row">
<h4>ZIP-Downloads</h4>
<div className="dashboard-downloads-meta">
{downloadSummary?.activeCount > 0 ? (
<Tag icon="pi pi-spinner" value={`${downloadSummary.activeCount} aktiv`} severity="warning" />
) : downloadSummary?.totalCount > 0 ? (
<Tag icon="pi pi-check" value={downloadSummary.failedCount > 0 ? `Fertig (${downloadSummary.failedCount} fehlgeschlagen)` : `${downloadSummary.totalCount} fertig`} severity={downloadSummary.failedCount > 0 ? 'danger' : 'success'} />
) : (
<Tag icon="pi pi-download" value="Keine aktiven Downloads" severity="secondary" />
)}
<Button
label="Downloads öffnen"
icon="pi pi-arrow-right"
size="small"
severity="secondary"
outlined
onClick={() => navigate('/downloads')}
/>
</div>
</div>
</Card> </Card>
</div> </div>
</div> </div>
+100 -1
View File
@@ -2588,11 +2588,42 @@ body {
grid-column: 1 / -1; grid-column: 1 / -1;
} }
.dashboard-downloads-row {
border-top: 1px solid var(--surface-border);
padding-top: 0.75rem;
margin-top: 0.5rem;
}
.dashboard-downloads-row h4 {
margin: 0 0 0.45rem;
font-size: 0.88rem;
}
.dashboard-downloads-meta {
display: flex;
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
}
.job-meta-subtle { .job-meta-subtle {
font-size: 0.82rem; font-size: 0.82rem;
color: var(--text-color-secondary); color: var(--text-color-secondary);
} }
.job-db-link {
font-size: 0.82rem;
color: var(--text-color-secondary);
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 0.3rem;
}
.job-db-link:hover {
color: var(--primary-color);
text-decoration: underline;
}
.job-meta-encode-config { .job-meta-encode-config {
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
@@ -2642,10 +2673,78 @@ body {
color: #46556a; color: #46556a;
} }
.job-detail-body {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.job-detail-body > h4 {
margin: 0.25rem 0 0;
}
.job-json-grid { .job-json-grid {
display: grid; display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem; gap: 0.55rem;
}
.job-titles-list {
display: flex;
flex-direction: column;
gap: 0.3rem;
font-size: 0.83rem;
}
.job-title-row {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 0.25rem 0.4rem;
border-radius: 0.3rem;
background: var(--surface-ground);
flex-wrap: wrap;
}
.job-title-row.job-title-row-selected {
background: color-mix(in srgb, var(--primary-color) 10%, transparent);
border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
}
.job-title-id {
font-weight: 600;
color: var(--text-color-secondary);
min-width: 2rem;
}
.job-title-name {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.job-title-duration,
.job-title-size {
color: var(--text-color-secondary);
white-space: nowrap;
}
.job-title-playlist {
color: var(--text-color-secondary);
font-size: 0.78rem;
white-space: nowrap;
}
.job-title-selected-badge {
font-size: 0.72rem;
font-weight: 600;
background: var(--primary-color);
color: var(--primary-color-text);
padding: 0.1rem 0.4rem;
border-radius: 999px;
white-space: nowrap;
} }
.json-box { .json-box {
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "ripster", "name": "ripster",
"version": "0.10.2-21", "version": "0.10.2-22",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "ripster", "name": "ripster",
"version": "0.10.2-21", "version": "0.10.2-22",
"devDependencies": { "devDependencies": {
"concurrently": "^9.1.2" "concurrently": "^9.1.2"
} }
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "ripster", "name": "ripster",
"private": true, "private": true,
"version": "0.10.2-21", "version": "0.10.2-22",
"scripts": { "scripts": {
"dev": "concurrently \"npm run dev --prefix backend\" \"npm run dev --prefix frontend\"", "dev": "concurrently \"npm run dev --prefix backend\" \"npm run dev --prefix frontend\"",
"dev:backend": "npm run dev --prefix backend", "dev:backend": "npm run dev --prefix backend",