Storing parent url for every child download, useful for knowing why WROLPi is downloading something. This is displayed on the Video and Archive download edit page. Updating Archive Download edit modal to use single url input.
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run

This commit is contained in:
Roland 2026-02-18 15:16:10 -07:00
parent 308b1d9c88
commit 99a716aa13
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
6 changed files with 95 additions and 10 deletions

View file

@ -285,6 +285,7 @@ function OnceDownloadRow({download, fetchDownloads, isSelected, onSelect}) {
const [editModalOpen, setEditModalOpen] = React.useState(false);
const {url, last_successful_download, status, location, error, downloader, settings, id, tag_names} = download;
const parentDownloadUrl = settings?.parent_download_url;
const handleDelete = async () => {
try {
@ -328,13 +329,23 @@ function OnceDownloadRow({download, fetchDownloads, isSelected, onSelect}) {
if (status === 'pending' || status === 'new') {
buttonCell = (
<TableCell>
<APIButton
color='red'
onClick={handleStop}
confirmContent='Are you sure you want to stop this download? It will not be retried.'
confirmButton='Stop'
obeyWROLMode={true}
>Stop</APIButton>
<ButtonGroup>
<APIButton
color='red'
icon='stop circle'
onClick={handleStop}
confirmContent='Are you sure you want to stop this download? It will not be retried.'
confirmButton='Stop'
obeyWROLMode={true}
/>
{status === 'new' && (downloader === Downloaders.Video || downloader === Downloaders.Archive) && (
<Button
icon='edit'
color='blue'
onClick={handleEditOpen}
/>
)}
</ButtonGroup>
</TableCell>
);
} else if (status === 'failed' || status === 'deferred') {
@ -411,6 +422,13 @@ function OnceDownloadRow({download, fetchDownloads, isSelected, onSelect}) {
onSuccess={handleEditSuccess}
onDelete={handleDelete}
/>
{parentDownloadUrl && (
<p style={{marginTop: '1em', color: '#666'}}>
From: <a href={parentDownloadUrl} target='_blank' rel='noopener noreferrer'>
{parentDownloadUrl}
</a>
</p>
)}
</Modal.Content>
</Modal>
);
@ -433,6 +451,13 @@ function OnceDownloadRow({download, fetchDownloads, isSelected, onSelect}) {
onSuccess={handleEditSuccess}
onDelete={handleDelete}
/>
{parentDownloadUrl && (
<p style={{marginTop: '1em', color: '#666'}}>
From: <a href={parentDownloadUrl} target='_blank' rel='noopener noreferrer'>
{parentDownloadUrl}
</a>
</p>
)}
</Modal.Content>
</Modal>
);