removed some msd api legacy

This commit is contained in:
Maxim Devaev
2023-03-18 03:40:57 +02:00
parent 18a8e5c9ef
commit 03ce7bfd2c
5 changed files with 19 additions and 32 deletions

View File

@@ -47,11 +47,6 @@ class Plugin(BaseMsd):
"busy": False,
"storage": None,
"drive": None,
"features": {
"multi": False,
"cdrom": False,
"rw": False,
},
}
async def poll_state(self) -> AsyncGenerator[dict, None]:

View File

@@ -173,8 +173,11 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
storage = dataclasses.asdict(self.__state.storage)
for name in list(storage["images"]):
del storage["images"][name]["name"]
del storage["images"][name]["path"]
del storage["images"][name]["in_storage"]
for name in list(storage["parts"]):
del storage["parts"][name]["name"]
storage["downloading"] = (self.__reader.get_state() if self.__reader else None)
storage["uploading"] = (self.__writer.get_state() if self.__writer else None)
@@ -191,11 +194,6 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
"busy": self.__state.is_busy(),
"storage": storage,
"drive": vd,
"features": {
"multi": True,
"cdrom": True,
"rw": True,
},
}
async def poll_state(self) -> AsyncGenerator[dict, None]: