mpd-now-playable/stubs/mpd/asyncio.pyi

29 lines
1.3 KiB
Python
Raw Permalink Normal View History

from collections.abc import AsyncIterator, Sequence
from typing import Literal
from mpd.base import MPDClientBase
from mpd_now_playable.mpd import types
class MPDClient(MPDClientBase):
mpd_version: str | None
def __init__(self) -> None: ...
async def connect(self, host: str, port: int = ...) -> None: ...
async def ping(self) -> None: ...
async def password(self, password: str) -> None: ...
def idle(self, subsystems: Sequence[str] = ...) -> AsyncIterator[Sequence[str]]: ...
async def status(self) -> types.StatusResponse: ...
async def currentsong(self) -> types.CurrentSongResponse: ...
async def albumart(self, uri: str) -> types.ReadPictureResponse: ...
async def readpicture(self, uri: str) -> types.ReadPictureResponse: ...
async def play(self) -> None: ...
async def pause(self, pause: Literal[1, 0, None] = None) -> None:
"""Pause MPD or toggle its play/pause state. Pass pause=1 to unconditionally pause, pause=0 to unconditionally unpause, or pause=None to toggle."""
pass
async def stop(self) -> None: ...
async def next(self) -> None: ... # noqa: A003
async def previous(self) -> None: ...
async def seekcur(self, position: float) -> None:
"""Seek to a particular time in the currently playing song, measured in seconds. Fractional seconds are supported."""
pass