fix(media): quote forwarded cookie headers

Keep yt-dlp config values intact and require explicit media metadata before downloads can start.
This commit is contained in:
NimBold
2026-07-10 00:27:44 +03:30
parent b1c84a0fb9
commit c5025fd5a0
4 changed files with 45 additions and 11 deletions
+8 -1
View File
@@ -187,11 +187,15 @@ describe('add download metadata workflow', () => {
expect(updated[0]).toBe(current);
});
it('allows ready and failed rows but blocks loading and invalid rows', () => {
it('allows normal-download fallback but blocks unresolved explicit media', () => {
expect(canSubmitMetadataRows([
row(),
row({ id: 'fallback', status: 'metadata-error' })
])).toBe(true);
expect(canSubmitMetadataRows([
row(),
row({ id: 'media-fallback', status: 'metadata-error', isMedia: true })
])).toBe(false);
expect(canSubmitMetadataRows([row({ status: 'loading' })])).toBe(false);
expect(canSubmitMetadataRows([row({ status: 'invalid' })])).toBe(false);
});
@@ -246,6 +250,9 @@ describe('add download metadata workflow', () => {
expect(metadataSummaryMessage([
row({ status: 'metadata-error' })
])).toContain('can still be added');
expect(metadataSummaryMessage([
row({ status: 'metadata-error', isMedia: true })
])).toContain('Refresh metadata before adding');
expect(metadataSummaryMessage([
row({ status: 'invalid' })
])).toContain('Correct or remove 1 invalid URL');