Use MAX_VOLUME constant in vlc_telnet (#48491)

We also don't need to call `int()` anymore due to underlying fixes in
the python-vlc-telnet library.

I believe this is the last item extracted from PR #44776.
This commit is contained in:
David McClosky
2021-03-30 03:57:53 -04:00
committed by GitHub
parent 0082eca932
commit e47d576ee7

View File

@@ -126,7 +126,7 @@ class VlcDevice(MediaPlayerEntity):
if status: if status:
if "volume" in status: if "volume" in status:
self._volume = int(status["volume"]) / 500.0 self._volume = status["volume"] / MAX_VOLUME
else: else:
self._volume = None self._volume = None
if "state" in status: if "state" in status: