Skip to content

Commit

Permalink
Added seek feature
Browse files Browse the repository at this point in the history
  • Loading branch information
albaintor committed Jul 18, 2024
1 parent 6e7fec4 commit e85059d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions intg-zidoo/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def __init__(self, config_device: DeviceInstance, device: ZidooRC):
Features.INFO,
Features.AUDIO_TRACK,
Features.SUBTITLE,
Features.SEEK,
]
attributes = {
Attributes.STATE: States.UNAVAILABLE,
Expand Down Expand Up @@ -191,6 +192,8 @@ async def command(
res = await self._device.send_key(ZKEYS.ZKEY_AUDIO)
elif cmd_id == Commands.SUBTITLE:
res = await self._device.send_key(ZKEYS.ZKEY_SUBTITLE)
elif cmd_id == Commands.SEEK:
res = await self._device.set_media_position(params.get("media_position", 0))
elif cmd_id == Commands.DIGIT_0:
res = await self._device.send_key(ZKEYS.ZKEY_NUM_0)
elif cmd_id == Commands.DIGIT_1:
Expand Down

0 comments on commit e85059d

Please sign in to comment.