fix(aria2): harden per-transfer DNS fallback (issue #35)

This commit is contained in:
NimBold
2026-08-05 19:28:56 +03:30
parent 4a83ac97c7
commit c1202229ac
27 changed files with 864 additions and 27 deletions
+8 -1
View File
@@ -215,6 +215,13 @@ export const DownloadItem = React.memo<DownloadItemProps>(({
return value === 'Unknown' ? t($ => $.addDownloads.unknown) : value;
})();
const downloadStatusLabel = t($ => $.downloads.status[download.status]);
const visibleErrorStatusLabel = download.lastErrorKind === 'nameResolution'
? download.status === 'retrying' && download.lastResolverFallback === true
? t($ => $.downloads.errors.nameResolutionRetrying)
: download.status === 'failed'
? t($ => $.downloads.errors.nameResolutionFailed)
: downloadStatusLabel
: downloadStatusLabel;
const downloadedSizeLabel = sizeDisplay.totalIsEstimate
? t($ => $.downloads.size.downloadedOfApproximate, {
downloaded: sizeDisplay.downloaded ?? '',
@@ -349,7 +356,7 @@ export const DownloadItem = React.memo<DownloadItemProps>(({
) : download.status === 'processing' ? (
downloadStatusLabel
) : (
downloadStatusLabel
visibleErrorStatusLabel
)}
</span>
</div>
+15 -1
View File
@@ -896,7 +896,21 @@ export const PropertiesWindowApp = () => {
<span className="text-text-muted">{t($ => $.properties.lastTry)}</span><span dir="ltr">{snapshot.lastTry || '—'}</span>
<span className="text-text-muted">{t($ => $.properties.queueId)}</span><span title={queuePlacement}>{queuePlacement}</span>
<span className="text-text-muted">{t($ => $.properties.resumable)}</span><span>{snapshot.resumable === false ? '—' : '✓'}</span>
{snapshot.lastError && <><span className="text-text-muted">{t($ => $.properties.lastError)}</span><span className="break-words text-red-300">{snapshot.lastError}</span></>}
{snapshot.lastError && <>
<span className="text-text-muted">{t($ => $.properties.lastError)}</span>
<div className="space-y-1 break-words text-red-300">
{snapshot.lastErrorKind === 'nameResolution' && (
<p className="font-medium text-text-primary">
{snapshot.status === 'retrying'
? snapshot.lastResolverFallback === true
? t($ => $.downloads.errors.nameResolutionRetrying)
: t($ => $.downloads.status.retrying)
: t($ => $.downloads.errors.nameResolutionFailed)}
</p>
)}
<span>{snapshot.lastError}</span>
</div>
</>}
</div>
{snapshot.isMedia === true && <div className="grid gap-2 rounded-lg border border-border-modal bg-bg-input/30 p-3 text-xs sm:grid-cols-2">
<span className="text-text-muted">{t($ => $.addDownloads.format)}</span><span className="break-all font-mono">{snapshot.mediaFormatSelector || '—'}</span>