mirror of
https://github.com/koush/scrypted.git
synced 2026-02-09 00:39:56 +00:00
server: publish
This commit is contained in:
4
server/package-lock.json
generated
4
server/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/server",
|
||||
"version": "0.5.10",
|
||||
"version": "0.5.11",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/server",
|
||||
"version": "0.5.10",
|
||||
"version": "0.5.11",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/server",
|
||||
"version": "0.5.10",
|
||||
"version": "0.5.11",
|
||||
"description": "",
|
||||
"dependencies": {
|
||||
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
||||
|
||||
@@ -203,27 +203,16 @@ export class PluginDeviceProxyHandler implements PrimitiveProxyHandler<any>, Scr
|
||||
}
|
||||
|
||||
return this.mixinTable[0].entry.then(entry => {
|
||||
let persist = !entry.error;
|
||||
if (entry.error) {
|
||||
console.error('Mixin device creation completed with error.');
|
||||
const allInterfaces = new Set(entry.allInterfaces);
|
||||
console.error('Mixin device creation completed with error. Merging with previous interface set to retain device descriptor.');
|
||||
const previousInterfaces = getState(pluginDevice, ScryptedInterfaceProperty.interfaces) as string[] || [];
|
||||
|
||||
let containsAll = true;
|
||||
while (containsAll && previousInterfaces.length) {
|
||||
containsAll &&= allInterfaces.has(previousInterfaces.pop());
|
||||
}
|
||||
|
||||
persist = containsAll;
|
||||
if (persist)
|
||||
console.log('Mixin device completed with interface same set or super set of previous set. Persisting.')
|
||||
const allInterfaces = new Set([...entry.allInterfaces, ...previousInterfaces]);
|
||||
entry.allInterfaces = [...allInterfaces];
|
||||
}
|
||||
|
||||
if (persist) {
|
||||
const changed = this.scrypted.stateManager.setPluginDeviceState(pluginDevice, ScryptedInterfaceProperty.interfaces, PluginDeviceProxyHandler.sortInterfaces(entry.allInterfaces));
|
||||
if (changed)
|
||||
this.scrypted.notifyPluginDeviceDescriptorChanged(pluginDevice);
|
||||
}
|
||||
const changed = this.scrypted.stateManager.setPluginDeviceState(pluginDevice, ScryptedInterfaceProperty.interfaces, PluginDeviceProxyHandler.sortInterfaces(entry.allInterfaces));
|
||||
if (changed)
|
||||
this.scrypted.notifyPluginDeviceDescriptorChanged(pluginDevice);
|
||||
return pluginDevice;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user