You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-26 22:13:53 +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:
@@ -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 };
|
||||
Reference in New Issue
Block a user