From 5293ef9015bb7bf3ec74fd09efc9ace146a026d2 Mon Sep 17 00:00:00 2001 From: aandrew-me Date: Sat, 8 Jun 2024 20:16:20 +0300 Subject: [PATCH] Change urls for mac to download --- .github/workflows/main.yml | 4 ++-- main.js | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f50a6d8..f866037 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,7 +39,7 @@ jobs: - name: Macos Intel Build if: matrix.os == 'macos-13' run: | - curl https://github.com/aandrew-me/ffmpeg-builds/releases/download/v6/ffmpeg_mac_amd64 -o ffmpeg + curl -L https://github.com/aandrew-me/ffmpeg-builds/releases/download/v6/ffmpeg_mac_amd64 -o ffmpeg chmod +x ffmpeg npm i npm run gh-mac @@ -47,7 +47,7 @@ jobs: - name: Macos Arm Build if: matrix.os == 'macos-latest' run: | - curl https://github.com/aandrew-me/ffmpeg-builds/releases/download/v6/ffmpeg_mac_arm64 -o ffmpeg + curl -L https://github.com/aandrew-me/ffmpeg-builds/releases/download/v6/ffmpeg_mac_arm64 -o ffmpeg chmod +x ffmpeg npm i npm run gh-mac diff --git a/main.js b/main.js index c177ead..8b933cb 100644 --- a/main.js +++ b/main.js @@ -283,9 +283,15 @@ ipcMain.on("autoUpdate", (event, status) => { }; dialog.showMessageBox(dialogOpts).then((returnValue) => { if (returnValue.response === 0) { - shell.openExternal( - "https://github.com/aandrew-me/ytDownloader/releases/latest/download/YTDownloader_Mac.dmg" - ); + if (process.arch === 'x64') { + shell.openExternal( + "https://github.com/aandrew-me/ytDownloader/releases/latest/download/YTDownloader_Mac_x64.dmg" + ); + } else { + shell.openExternal( + "https://github.com/aandrew-me/ytDownloader/releases/latest/download/YTDownloader_Mac_arm64.dmg" + ); + } } }); }