@scrypted/server 0.69.0 → 0.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrypted/server",
3
- "version": "0.69.0",
3
+ "version": "0.71.0",
4
4
  "description": "",
5
5
  "dependencies": {
6
6
  "@mapbox/node-pre-gyp": "^1.0.11",
@@ -56,12 +56,10 @@ class SystemDeviceState(TypedDict):
56
56
 
57
57
 
58
58
  class DeviceProxy(object):
59
- device: asyncio.Future[rpc.RpcPeer]
60
-
61
59
  def __init__(self, systemManager: SystemManager, id: str):
62
60
  self.systemManager = systemManager
63
61
  self.id = id
64
- self.device = None
62
+ self.device: asyncio.Future[rpc.RpcPeer] = None
65
63
 
66
64
  def __getattr__(self, name):
67
65
  if name == 'id':
@@ -95,13 +93,11 @@ class DeviceProxy(object):
95
93
 
96
94
 
97
95
  class SystemManager(scrypted_python.scrypted_sdk.types.SystemManager):
98
- deviceProxies: Mapping[str, DeviceProxy]
99
-
100
96
  def __init__(self, api: Any, systemState: Mapping[str, Mapping[str, SystemDeviceState]]) -> None:
101
97
  super().__init__()
102
98
  self.api = api
103
99
  self.systemState = systemState
104
- self.deviceProxies = {}
100
+ self.deviceProxies: Mapping[str, DeviceProxy] = {}
105
101
 
106
102
  async def getComponent(self, id: str) -> Any:
107
103
  return await self.api.getComponent(id)
@@ -329,16 +325,12 @@ class DeviceManager(scrypted_python.scrypted_sdk.types.DeviceManager):
329
325
 
330
326
 
331
327
  class PluginRemote:
332
- systemState: Mapping[str, Mapping[str, SystemDeviceState]] = {}
333
- nativeIds: Mapping[str, DeviceStorage] = {}
334
- pluginId: str
335
- hostInfo: Any
336
- mediaManager: MediaManager
337
- loop: AbstractEventLoop
338
- consoles: Mapping[str, Future[Tuple[StreamReader, StreamWriter]]] = {}
339
- ptimeSum = 0
340
-
341
- def __init__(self, peer: rpc.RpcPeer, api, pluginId, hostInfo, loop: AbstractEventLoop):
328
+ def __init__(self, peer: rpc.RpcPeer, api, pluginId: str, hostInfo, loop: AbstractEventLoop):
329
+ self.systemState: Mapping[str, Mapping[str, SystemDeviceState]] = {}
330
+ self.nativeIds: Mapping[str, DeviceStorage] = {}
331
+ self.mediaManager: MediaManager
332
+ self.consoles: Mapping[str, Future[Tuple[StreamReader, StreamWriter]]] = {}
333
+ self.ptimeSum = 0
342
334
  self.allMemoryStats = {}
343
335
  self.peer = peer
344
336
  self.api = api
package/python/rpc.py CHANGED
@@ -374,7 +374,7 @@ class RpcPeer:
374
374
  return RpcPeer.deserializeError(__serialized_value)
375
375
 
376
376
  if __remote_proxy_id:
377
- weakref = self.remoteWeakProxies.get('__remote_proxy_id', None)
377
+ weakref = self.remoteWeakProxies.get(__remote_proxy_id, None)
378
378
  proxy = weakref() if weakref else None
379
379
  if not proxy:
380
380
  proxy = self.newProxy(__remote_proxy_id, __remote_constructor_name,
@@ -52,8 +52,6 @@ class RpcTransport:
52
52
 
53
53
 
54
54
  class RpcFileTransport(RpcTransport):
55
- executor: ThreadPoolExecutor
56
-
57
55
  def __init__(self, readFd: int, writeFd: int) -> None:
58
56
  super().__init__()
59
57
  self.readFd = readFd