Fix media_pause in vlc_telnet (#46675)
The underlying python-telnet-vlc pause() function toggles play/pause, so we need to check our state before calling it.pull/46686/head
parent
58499946ed
commit
58f6db0127
|
@ -245,7 +245,11 @@ class VlcDevice(MediaPlayerEntity):
|
|||
|
||||
def media_pause(self):
|
||||
"""Send pause command."""
|
||||
self._vlc.pause()
|
||||
current_state = self._vlc.status().get("state")
|
||||
if current_state != "paused":
|
||||
# Make sure we're not already paused since VLCTelnet.pause() toggles
|
||||
# pause.
|
||||
self._vlc.pause()
|
||||
self._state = STATE_PAUSED
|
||||
|
||||
def media_stop(self):
|
||||
|
|
Loading…
Reference in New Issue