Improve engine identification and id generation.
This commit is contained in:
+9
-2
@@ -14,8 +14,15 @@ export function getCameraID(
|
||||
(typeof config?.camera_entity === 'string' && config.camera_entity) ||
|
||||
(typeof config?.webrtc_card === 'object' &&
|
||||
config.webrtc_card &&
|
||||
typeof config.webrtc_card['entity'] === 'string' &&
|
||||
config.webrtc_card['entity']) ||
|
||||
((typeof config.webrtc_card['entity'] === 'string' &&
|
||||
config.webrtc_card['entity']) ||
|
||||
(typeof config.webrtc_card['url'] === 'string' && config.webrtc_card['url']))) ||
|
||||
(typeof config?.go2rtc === 'object' &&
|
||||
config.go2rtc &&
|
||||
typeof config.go2rtc['url'] === 'string' &&
|
||||
typeof config.go2rtc['stream'] === 'string' &&
|
||||
// Artifical identifier that includes both url / stream.
|
||||
`${config.go2rtc['url']}#${config.go2rtc['stream']}`) ||
|
||||
(typeof config?.frigate === 'object' &&
|
||||
config.frigate &&
|
||||
typeof config?.frigate['camera_name'] === 'string' &&
|
||||
|
||||
Reference in New Issue
Block a user