Add missing type hint in vlc (#145223)

This commit is contained in:
epenet 2025-05-19 15:52:40 +02:00 committed by GitHub
parent 760f2d1959
commit 8df447091d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -70,7 +70,7 @@ class VlcDevice(MediaPlayerEntity):
self._vlc = self._instance.media_player_new()
self._attr_name = name
def update(self):
def update(self) -> None:
"""Get the latest details from the device."""
status = self._vlc.get_state()
if status == vlc.State.Playing:
@ -88,8 +88,6 @@ class VlcDevice(MediaPlayerEntity):
self._attr_volume_level = self._vlc.audio_get_volume() / 100
self._attr_is_volume_muted = self._vlc.audio_get_mute() == 1
return True
def media_seek(self, position: float) -> None:
"""Seek the media to a specific location."""
track_length = self._vlc.get_length() / 1000