Add descriptions to websockets config

This commit is contained in:
Danielle McLean 2024-07-13 19:28:18 +10:00
parent ca5086f93a
commit 21b7c28692
Signed by: 00dani
GPG key ID: 6854781A0488421C
2 changed files with 8 additions and 0 deletions

View file

@ -59,6 +59,7 @@
"type": "array"
}
],
"description": "The hostname you'd like your WebSockets server to listen on. In most cases the default behaviour, which binds to all network interfaces, will be fine.",
"title": "Host"
},
"kind": {
@ -71,6 +72,7 @@
"type": "string"
},
"port": {
"description": "The TCP port you'd like your WebSockets server to listen on. Should generally be higher than 1024, since mpd-now-playable doesn't normally run with the privilege to bind to low-numbered ports.",
"maximum": 65535,
"minimum": 1,
"title": "Port",

View file

@ -28,7 +28,13 @@ class CocoaReceiverConfig(BaseReceiverConfig):
@dataclass(slots=True, kw_only=True)
class WebsocketsReceiverConfig(BaseReceiverConfig):
kind: Literal["websockets"] = field(default="websockets", repr=False)
#: The TCP port you'd like your WebSockets server to listen on. Should
#: generally be higher than 1024, since mpd-now-playable doesn't normally
#: run with the privilege to bind to low-numbered ports.
port: Port
#: The hostname you'd like your WebSockets server to listen on. In most
#: cases the default behaviour, which binds to all network interfaces, will
#: be fine.
host: Optional[Host | tuple[Host, ...]] = None