Read-only asynchronous MPD playback observer.
More...
|
| TrackIdentity|None | _query (self) |
| dict[str, list[str]] | _command (self, asyncio.StreamReader reader, asyncio.StreamWriter writer, str command, str|None argument=None) |
Read-only asynchronous MPD playback observer.
◆ __init__()
| None musicforge.providers.mpd.MpdPlaybackSource.__init__ |
( |
| self, |
|
|
str | host = "127.0.0.1", |
|
|
int | port = 6600, |
|
|
str | None | password = None, |
|
|
float | timeout = 5.0 ) |
Initialize the configured instance.
- Parameters
-
| self | Current instance. |
| host | MPD server address. |
| port | MPD TCP port. |
| password | Optional MPD password. |
| timeout | Query timeout in seconds. |
◆ _command()
| dict[str, list[str]] musicforge.providers.mpd.MpdPlaybackSource._command |
( |
| self, |
|
|
asyncio.StreamReader | reader, |
|
|
asyncio.StreamWriter | writer, |
|
|
str | command, |
|
|
str | None | argument = None ) |
|
protected |
◆ _query()
| TrackIdentity | None musicforge.providers.mpd.MpdPlaybackSource._query |
( |
| self | ) |
|
|
protected |
◆ current_track()
| TrackIdentity | None musicforge.providers.mpd.MpdPlaybackSource.current_track |
( |
| self | ) |
|
Return the playing or paused track; None when stopped or unavailable.
- Parameters
-
- Returns
- Observed track, or None if unavailable.
Connection/protocol failures raise MpdError rather than being mistaken for a stopped player.
◆ host
| musicforge.providers.mpd.MpdPlaybackSource.host |
◆ password
| musicforge.providers.mpd.MpdPlaybackSource.password |
◆ port
| musicforge.providers.mpd.MpdPlaybackSource.port |
◆ timeout
| tuple musicforge.providers.mpd.MpdPlaybackSource.timeout |
Initial value:= (
host,
port,
password,
timeout,
)
The documentation for this class was generated from the following file: