lavalink_rs.model.track API documentation

# lavalink_rs.model.track

class TrackLoadType:

The type of data returned when loading a track.

Track: lavalink_rs.model.track.TrackLoadType = TrackLoadType.Track
Playlist: lavalink_rs.model.track.TrackLoadType = TrackLoadType.Playlist
Search: lavalink_rs.model.track.TrackLoadType = TrackLoadType.Search
Empty: lavalink_rs.model.track.TrackLoadType = TrackLoadType.Empty
Error: lavalink_rs.model.track.TrackLoadType = TrackLoadType.Error
class Track:
load_type: lavalink_rs.model.track.TrackLoadType
data: Union[lavalink_rs.model.track.TrackData, lavalink_rs.model.track.PlaylistData, List[lavalink_rs.model.track.TrackData], lavalink_rs.model.track.TrackError, NoneType]
class TrackData:

Information about a track.

user_data: Union[Dict[str, Union[Dict[str, ForwardRef('JSON')], List[ForwardRef('JSON')], str, int, float, bool, NoneType]], List[Union[Dict[str, ForwardRef('JSON')], List[ForwardRef('JSON')], str, int, float, bool, NoneType]], str, int, float, bool, NoneType]
plugin_info: Union[Dict[str, Union[Dict[str, ForwardRef('JSON')], List[ForwardRef('JSON')], str, int, float, bool, NoneType]], List[Union[Dict[str, ForwardRef('JSON')], List[ForwardRef('JSON')], str, int, float, bool, NoneType]], str, int, float, bool, NoneType]
encoded: str
info: lavalink_rs.model.track.TrackInfo
class TrackInfo:

Information and metadata about the track.

identifier: str

The track identifier.

uri: Optional[str]

The track uri.

author: str

The track author.

title: str

The track title,

position: int

The track starting position in milliseconds.

length: int

The track length in milliseconds.

artwork_url: Optional[str]

The track artwork url.

is_seekable: bool

Whether the track is seekable.

isrc: Optional[str]

The track "International Standard Recording Code".

source_name: str

The track source name.

is_stream: bool

Whether the track is a stream.

class PlaylistData:
plugin_info: Union[Dict[str, Union[Dict[str, ForwardRef('JSON')], List[ForwardRef('JSON')], str, int, float, bool, NoneType]], List[Union[Dict[str, ForwardRef('JSON')], List[ForwardRef('JSON')], str, int, float, bool, NoneType]], str, int, float, bool, NoneType]
tracks: List[lavalink_rs.model.track.TrackData]
info: lavalink_rs.model.track.PlaylistInfo
class PlaylistInfo:
name: str

The name of the playlist.

selected_track: Optional[int]

The selected track of the playlist.

None if no track is selected.

class TrackError:
message: str

The message of the exception.

cause: str

The cause of the exception.

severity: str

The severity of the exception.