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. + + + {loading ? "Running…" : "Run test"} + + + {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 */}
Test yt-dlp
Runs a metadata fetch against a test video and shows the raw output.
+ {JSON.stringify(result, null, 2)} +