Ejemplo n.º 1
0
    async def async_seek_rel_time(self, time: timedelta) -> None:
        """Send seek command with REL_TIME."""
        if not self._can_transport_action("seek"):
            _LOGGER.debug("Cannot do Seek by REL_TIME")
            return

        action = self._action("AVT", "Seek")
        if not action:
            raise UpnpError("Missing action AVT/Seek")
        target = time_to_str(time)
        await action.async_call(InstanceID=0, Unit="REL_TIME", Target=target)
Ejemplo n.º 2
0
    async def async_seek_abs_time(self, time: timedelta) -> None:
        """Send seek command with ABS_TIME."""
        if not self._can_transport_action('seek'):
            _LOGGER.debug('Cannot do Seek by ABS_TIME')
            return

        action = self._action('AVT', 'Seek')
        if not action:
            raise UpnpError('Missing action AVT/Seek')
        target = time_to_str(time)
        await action.async_call(InstanceID=0, Unit='ABS_TIME', Target=target)