diff --git a/src-tauri/binaries/yt-dlp-x86_64-pc-windows-msvc.exe b/src-tauri/binaries/yt-dlp-x86_64-pc-windows-msvc.exe index 1c575aa..0029c3d 100644 --- a/src-tauri/binaries/yt-dlp-x86_64-pc-windows-msvc.exe +++ b/src-tauri/binaries/yt-dlp-x86_64-pc-windows-msvc.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5fa4862eb50050941370fa78a8c56faa31516d5abaf1f7cf31bc56de166347d9 -size 18123562 +oid sha256:aad1281d4d87b82ba44882b233451e2a605b0ab20ff6b0fd0efee7f9d129ad61 +size 18116266 diff --git a/src/App.tsx b/src/App.tsx index 43dd402..383d2ec 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -129,8 +129,14 @@ export default function App({ children }: { children: React.ReactNode }) { resolve(null); } else { try { - const parsedData: RawVideoInfo = JSON.parse(jsonOutput); - resolve(parsedData); + const matchedJson = jsonOutput.match(/{.*}/); + if (!matchedJson) { + console.error(`Failed to match JSON: ${jsonOutput}`); + resolve(null); + return; + } + const parsedJson: RawVideoInfo = JSON.parse(matchedJson[0]); + resolve(parsedJson); } catch (e) { console.error(`Failed to parse JSON: ${e}`);