2023-11-26 23:48:52 -05:00
|
|
|
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):
|
2023-12-05 21:54:40 -05:00
|
|
|
mpd_version: str | None
|
2023-11-26 23:48:52 -05:00
|
|
|
|
2023-12-05 21:54:40 -05:00
|
|
|
def __init__(self) -> None: ...
|
|
|
|
async def connect(self, host: str, port: int = ...) -> 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 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
|