mirror of
https://github.com/koush/scrypted.git
synced 2026-03-20 16:40:24 +00:00
server: remove legacy storage event
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.123.56",
|
||||
"version": "0.123.57",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/server",
|
||||
"version": "0.123.56",
|
||||
"version": "0.123.57",
|
||||
"hasInstallScript": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
||||
@@ -115,7 +115,7 @@ class EventRegistry(object):
|
||||
]
|
||||
|
||||
__allowedEventInterfaces = set(
|
||||
[ScryptedInterface.ScryptedDevice.value, "Logger", "Storage"]
|
||||
[ScryptedInterface.ScryptedDevice.value, "Logger"]
|
||||
)
|
||||
|
||||
def __init__(self) -> None:
|
||||
|
||||
@@ -21,7 +21,7 @@ export function getMixinEventName(options: string | EventListenerOptions) {
|
||||
}
|
||||
|
||||
// todo: storage should only go to host plugin
|
||||
const allowedEventInterfaces = new Set<string>([ScryptedInterface.ScryptedDevice, 'Logger', 'Storage'])
|
||||
const allowedEventInterfaces = new Set<string>([ScryptedInterface.ScryptedDevice, 'Logger'])
|
||||
|
||||
export class EventRegistry {
|
||||
systemListeners = new Set<(id: string, eventDetails: EventDetails, eventData: any) => void>();
|
||||
|
||||
@@ -130,7 +130,6 @@ export class PluginHostAPI extends PluginAPIManagedListeners implements PluginAP
|
||||
const device = this.scrypted.findPluginDevice(this.pluginId, nativeId)
|
||||
device.storage = storage;
|
||||
this.scrypted.datastore.upsert(device);
|
||||
this.scrypted.stateManager.notifyInterfaceEvent(device, 'Storage', undefined);
|
||||
}
|
||||
|
||||
async onDevicesChanged(deviceManifest: DeviceManifest) {
|
||||
|
||||
@@ -50,7 +50,6 @@ export class PluginComponent {
|
||||
await this.scrypted.datastore.upsert(pluginDevice);
|
||||
const host = this.scrypted.getPluginHostForDeviceId(id);
|
||||
await host?.remote?.setNativeId?.(pluginDevice.nativeId, pluginDevice._id, storage);
|
||||
this.scrypted.stateManager.notifyInterfaceEvent(pluginDevice, 'Storage', undefined);
|
||||
}
|
||||
async setMixins(id: string, mixins: string[]) {
|
||||
mixins = mixins || [];
|
||||
|
||||
Reference in New Issue
Block a user