server: remove legacy storage event

This commit is contained in:
Koushik Dutta
2024-12-05 09:24:36 -08:00
parent e2eba2a227
commit b4aa20b4cd
5 changed files with 4 additions and 6 deletions

View File

@@ -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": {

View File

@@ -115,7 +115,7 @@ class EventRegistry(object):
]
__allowedEventInterfaces = set(
[ScryptedInterface.ScryptedDevice.value, "Logger", "Storage"]
[ScryptedInterface.ScryptedDevice.value, "Logger"]
)
def __init__(self) -> None:

View File

@@ -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>();

View File

@@ -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) {

View File

@@ -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 || [];