aiovlc.model package

Provide a model for aiovlc.

Submodules

aiovlc.model.command module

Provide commands for aiovlc.

class aiovlc.model.command.Add(playlist_item: str)[source]

Bases: Command[None]

Represent the add command.

build_command() str[source]

Return the full command string.

playlist_item: str
prefix: str = 'add'
class aiovlc.model.command.Clear[source]

Bases: Command[None]

Represent the clear command.

prefix: str = 'clear'
class aiovlc.model.command.Command[source]

Bases: Generic

Represent a VLC command.

build_command() str[source]

Return the full command string.

log_command: bool = True
parse_output(output: list[str]) T[source]

Parse command output.

prefix: str
read_terminator: str = '> '
async send(client: Client) T[source]

Send the command.

class aiovlc.model.command.CommandOutput[source]

Bases: object

Represent a command output.

class aiovlc.model.command.Enqueue(playlist_item: str)[source]

Bases: Command[None]

Represent the enqueue command.

build_command() str[source]

Return the full command string.

playlist_item: str
prefix: str = 'enqueue'
class aiovlc.model.command.GetLength[source]

Bases: Command[GetLengthOutput]

Represent the get length command.

parse_output(output: list[str]) GetLengthOutput[source]

Parse command output.

prefix: str = 'get_length'
class aiovlc.model.command.GetLengthOutput(length: int)[source]

Bases: CommandOutput

Represent the get length command output.

length: int
class aiovlc.model.command.GetTime[source]

Bases: Command[GetTimeOutput]

Represent the get time command.

parse_output(output: list[str]) GetTimeOutput[source]

Parse command output.

prefix: str = 'get_time'
class aiovlc.model.command.GetTimeOutput(time: int)[source]

Bases: CommandOutput

Represent the get time command output.

time: int
class aiovlc.model.command.Info[source]

Bases: Command[InfoOutput]

Represent the info command.

parse_output(output: list[str]) InfoOutput[source]

Parse command output.

prefix: str = 'info'
class aiovlc.model.command.InfoOutput(data: dict[str | int, dict[str, str | int | float]]=<factory>)[source]

Bases: CommandOutput

Represent the info command output.

data: dict[str | int, dict[str, str | int | float]]
class aiovlc.model.command.Next[source]

Bases: Command[None]

Represent the next command.

prefix: str = 'next'
class aiovlc.model.command.Password(password: str)[source]

Bases: Command[PasswordOutput]

Represent the password command.

build_command() str[source]

Return the full command string.

log_command: bool = False
parse_output(output: list[str]) PasswordOutput[source]

Parse command output.

password: str
prefix: str = ''
read_terminator: str = '\n'
async send(client: Client) PasswordOutput[source]

Send the command.

class aiovlc.model.command.PasswordOutput(response: str)[source]

Bases: CommandOutput

Represent the password command output.

response: str
class aiovlc.model.command.Pause[source]

Bases: Command[None]

Represent the pause command.

prefix: str = 'pause'
class aiovlc.model.command.Play[source]

Bases: Command[None]

Represent the play command.

prefix: str = 'play'
class aiovlc.model.command.Prev[source]

Bases: Command[None]

Represent the prev command.

prefix: str = 'prev'
class aiovlc.model.command.Random(mode: Literal['on', 'off'] | None = None)[source]

Bases: Command[None]

Represent the random command.

VALID_MODES = (None, 'on', 'off')
build_command() str[source]

Return the full command string.

mode: Literal['on', 'off'] | None = None
prefix: str = 'random'
class aiovlc.model.command.Seek(seconds: int)[source]

Bases: Command[None]

Represent the seek command.

build_command() str[source]

Return the full command string.

prefix: str = 'seek'
seconds: int
class aiovlc.model.command.SetVolume(volume: int)[source]

Bases: Command[None]

Represent the set volume command.

VALID_VOLUME = range(0, 500)
build_command() str[source]

Return the full command string.

prefix: str = 'volume'
volume: int
class aiovlc.model.command.Status[source]

Bases: Command[StatusOutput]

Represent the status command.

parse_output(output: list[str]) StatusOutput[source]

Parse command output.

prefix: str = 'status'
class aiovlc.model.command.StatusOutput(audio_volume: int, state: str, input_loc: str | None = None)[source]

Bases: CommandOutput

Represent the status command output.

audio_volume: int
input_loc: str | None = None
state: str
class aiovlc.model.command.Stop[source]

Bases: Command[None]

Represent the stop command.

prefix: str = 'stop'
class aiovlc.model.command.Volume[source]

Bases: Command[VolumeOutput]

Represent the volume command.

parse_output(output: list[str]) VolumeOutput[source]

Parse command output.

prefix: str = 'volume'
class aiovlc.model.command.VolumeOutput(audio_volume: int)[source]

Bases: CommandOutput

Represent the volume command output.

audio_volume: int