From ecb246ed99e0f894f9c492e5d7685fc448d1f03f Mon Sep 17 00:00:00 2001 From: Mattias Tall Date: Tue, 26 May 2026 10:45:28 +0200 Subject: [PATCH] Add yt-dlp diagnostic button to Settings page Shows node version, yt-dlp version, cookie args, and raw stderr tail to diagnose download/metadata failures without needing shell access. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/pages/Settings.jsx | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/frontend/src/pages/Settings.jsx b/frontend/src/pages/Settings.jsx index f206c29..5df18f3 100644 --- a/frontend/src/pages/Settings.jsx +++ b/frontend/src/pages/Settings.jsx @@ -295,6 +295,49 @@ function CookiesSection({ s, qc, set }) { ); } +function DiagnosticSection() { + const [result, setResult] = useState(null); + const [loading, setLoading] = useState(false); + + const run = async () => { + setLoading(true); + setResult(null); + try { + const res = await testYtdlp(); + setResult(res.data); + } catch (e) { + setResult({ error: e.response?.data?.detail || e.message }); + } finally { + setLoading(false); + } + }; + + return ( +
+
+
+
+

Test yt-dlp

+

Runs a metadata fetch against a test video and shows the raw output.

+
+ +
+ {result && ( +
+            {JSON.stringify(result, null, 2)}
+          
+ )} +
+
+ ); +} + function OAuth2Section({ s, qc }) { const [flowState, setFlowState] = useState(null); // null | {status, device_url, code} const [polling, setPolling] = useState(false); @@ -491,6 +534,7 @@ export default function SettingsPage() { {/* YouTube authentication */} + {/* Download quality */}