From 535a058a367f96f4ebc40b58caa3d37a46c00749 Mon Sep 17 00:00:00 2001 From: Billy Richardson Date: Fri, 10 Jun 2022 00:41:02 -0700 Subject: [PATCH] Remove windows-32 ffmpeg download --- modules/FfmpegUpdater.js | 3 +-- tests/FfmpegUpdater.test.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/FfmpegUpdater.js b/modules/FfmpegUpdater.js index 712d18e0..89b1c8c1 100644 --- a/modules/FfmpegUpdater.js +++ b/modules/FfmpegUpdater.js @@ -69,7 +69,6 @@ class FfmpegUpdater { try { const res = await axios.get("https://ffbinaries.com/api/v1/version/latest"); let platform = "windows-64"; - if (os.arch() === "x32" || os.arch() === "ia32") platform = "windows-32"; if (process.platform === "darwin") platform = "osx-64"; else if (process.platform === "linux") platform = "linux-32"; return { @@ -86,7 +85,7 @@ class FfmpegUpdater { } } - //Returns the currently downloaded version of yt-dlp + //Returns the currently downloaded version of yt-dlp async getLocalVersion() { let data; try { diff --git a/tests/FfmpegUpdater.test.js b/tests/FfmpegUpdater.test.js index e8717465..0de49f50 100644 --- a/tests/FfmpegUpdater.test.js +++ b/tests/FfmpegUpdater.test.js @@ -58,7 +58,7 @@ describe('getRemoteVersion', () => { }); it('returns object with the links and the version', async () => { const axiosGetSpy = jest.spyOn(axios, 'get').mockResolvedValue({ - data: { version: "4.2.1", bin: { "windows-32": { ffmpeg: "ffmpeg/link", ffprobe: "ffprobe/link" } } }, + data: { version: "4.4.1", bin: { "windows-64": { ffmpeg: "ffmpeg/link", ffprobe: "ffprobe/link" } } }, }); jest.spyOn(os, 'arch').mockReturnValue('ia32'); Object.defineProperty(process, "platform", { @@ -69,7 +69,7 @@ describe('getRemoteVersion', () => { expect(result).toEqual({ remoteFfmpegUrl: "ffmpeg/link", remoteFfprobeUrl: "ffprobe/link", - remoteVersion: "4.2.1" + remoteVersion: "4.4.1" }); expect(axiosGetSpy).toBeCalledTimes(1); });