pub async fn loadfile(
filename: &str,
append: bool,
socket_path: Option<&str>,
) -> Result<Option<Value>>Expand description
Sends the loadfile command to load a file into MPV.
§Arguments
filename: The name of the file to load.append: Whether to append the file to the playlist (true) or replace the current file (false).socket_path: An optional custom socket path.
§Returns
A Result containing the response data.
§Errors
Returns an error if the connection to the socket fails or the command execution encounters issues.