process cdrom/rw forbidden states in set_params()

This commit is contained in:
Maxim Devaev 2022-07-24 05:55:45 +03:00
parent 88b2e90438
commit 779d0de59f

View File

@ -290,9 +290,13 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
if cdrom is not None: if cdrom is not None:
self.__state.vd.cdrom = cdrom self.__state.vd.cdrom = cdrom
if cdrom:
rw = False
if rw is not None: if rw is not None:
self.__state.vd.rw = rw self.__state.vd.rw = rw
if rw:
self.__state.vd.cdrom = False
@aiotools.atomic @aiotools.atomic
async def set_connected(self, connected: bool) -> None: async def set_connected(self, connected: bool) -> None: