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: ...
|
2024-07-28 20:55:27 -04:00
|
|
|
async def ping(self) -> None: ...
|
2023-12-05 21:54:40 -05:00
|
|
|
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: ...
|
2024-05-16 20:18:18 -04:00
|
|
|
async def albumart(self, uri: str) -> types.ReadPictureResponse: ...
|
2023-12-05 21:54:40 -05:00
|
|
|
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
|