diff options
author | Devaev Maxim <[email protected]> | 2018-08-24 22:33:47 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-08-24 22:33:47 +0300 |
commit | 1fdd929f2a5d7775f6b9e77fd3487dfb511c0928 (patch) | |
tree | b4a2aba24832fa6f8544a1383bd11b2748bcb4b2 /kvmd | |
parent | 90a26662159782fa63d7a034073fe96c5cd58475 (diff) |
separated reset and resolution
Diffstat (limited to 'kvmd')
-rw-r--r-- | kvmd/kvmd/server.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kvmd/kvmd/server.py b/kvmd/kvmd/server.py index 807c7219..88131c28 100644 --- a/kvmd/kvmd/server.py +++ b/kvmd/kvmd/server.py @@ -308,9 +308,7 @@ class Server: # pylint: disable=too-many-instance-attributes resolution = request.query.get("resolution") if resolution: if resolution in self.__streamer.get_available_resolutions(): - if resolution != self.__streamer_resolution: - self.__streamer_resolution = resolution - self.__reset_streamer = True + self.__streamer_resolution = resolution else: raise BadRequest("Unknown resolution %r" % (resolution)) return _json() @@ -367,7 +365,7 @@ class Server: # pylint: disable=too-many-instance-attributes await self.__streamer.stop() await self.__broadcast_event("streamer_state", **self.__streamer.get_state()) - if self.__reset_streamer: + if self.__reset_streamer or self.__streamer_resolution != self.__streamer.get_current_resolution(): if self.__streamer.is_running(): await self.__streamer.stop() await self.__streamer.start(self.__streamer_resolution, no_init_restart=True) |