Skip to content

Commit

Permalink
Fix: correct macOS version checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjdhjd committed Oct 20, 2024
1 parent 0e51b44 commit 2926ff4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
19 changes: 8 additions & 11 deletions install.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,18 @@ async function getDownloadFileName() {

case "darwin":

if(parseInt(os.release()) >= 24) {

switch(process.arch) {
switch(process.arch) {

case "x64":
case "x64":

return "ffmpeg-darwin-x86_64.tar.gz";
return "ffmpeg-darwin-x86_64.tar.gz";

case "arm64":
case "arm64":

return "ffmpeg-darwin-arm64.tar.gz";
return "ffmpeg-darwin-arm64.tar.gz";

default:
return null;
}
default:
return null;
}

case "linux":
Expand Down Expand Up @@ -225,7 +222,7 @@ async function install() {
ensureFfmpegCacheDir();

// Ensure we don't support versions of macOS that are too old.
if(os.platform() === "darwin" && parseInt(os.release()) < MACOS_MINIMUM_SUPPORTED_VERSION) {
if((os.platform().toString() === "darwin") && (parseInt(os.release().split(".")[0]) < MACOS_MINIMUM_SUPPORTED_VERSION)) {

console.error("ffmpeg-for-homebridge: macOS versions older than " + MACOS_MINIMUM_SUPPORTED_RELEASE + " are not supported, you will need to install a working version of FFmpeg manually.");

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ffmpeg-for-homebridge",
"version": "2.1.6",
"version": "2.1.7",
"description": "Static FFmpeg binaries for Homebridge with support for audio (libfdk-aac) and hardware encoding (h264_v4l2m2m and h264_qsv).",
"author": {
"name": "The Homebridge Team",
Expand Down

0 comments on commit 2926ff4

Please sign in to comment.