1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-26 14:11:59 +01:00

Not sure which has better code, firmware, or this? This is okay, but toy lang. Firmware was horrible.

This commit is contained in:
2026-02-23 23:15:15 +01:00
parent d0a26d2346
commit 410c39a6b8
25 changed files with 978 additions and 512 deletions

View File

@@ -11,11 +11,8 @@ function checkFFmpeg() {
});
checkFFmpegProcess.on('exit', (code) => {
if (code === 0) {
resolve('ffmpeg');
} else {
resolve(require('ffmpeg-static'));
}
if (code === 0) resolve('ffmpeg');
else resolve(require('ffmpeg-static'));
});
});
}

View File

@@ -74,9 +74,7 @@ function parseAudioDevice(options, callback) {
if (platform === 'win32' && line.search(/Alternative\sname/) > -1) {
const lastDevice = deviceList[deviceList.length - 1];
const alt = line.match(alternativeName);
if (lastDevice && alt) {
lastDevice.alternativeName = alt[1];
}
if (lastDevice && alt) lastDevice.alternativeName = alt[1];
return;
}
@@ -107,11 +105,8 @@ function parseAudioDevice(options, callback) {
}
};
if (callbackExists) {
execute();
} else {
return new Promise(execute);
}
if (callbackExists) execute();
else return new Promise(execute);
}
module.exports = { parseAudioDevice };