mirror of
https://github.com/koush/scrypted.git
synced 2026-06-13 14:00:24 +01:00
Merge branch 'main' of github.com:koush/scrypted
This commit is contained in:
@@ -20,6 +20,11 @@ export async function getDeviceInfo(credential: AuthFetchCredentialState, addres
|
||||
const serialNumber = response.body.match(/>(.*?)<\/serialNumber>/)?.[1];
|
||||
const macAddress = response.body.match(/>(.*?)<\/macAddress>/)?.[1];
|
||||
const firmwareVersion = response.body.match(/>(.*?)<\/firmwareVersion>/)?.[1];
|
||||
|
||||
if (!deviceModel && !deviceName && !serialNumber && !macAddress && !firmwareVersion) {
|
||||
throw new Error('Failed to parse device info from camera.');
|
||||
}
|
||||
|
||||
return {
|
||||
deviceModel,
|
||||
deviceName,
|
||||
|
||||
Reference in New Issue
Block a user