Merge branch 'fixes' into 'master'
Custom commands + impl std::error::Error See merge request mpv-ipc/mpvipc!2
This commit is contained in:
commit
ac2d94754c
|
@ -172,6 +172,8 @@ impl Display for Error {
|
|||
}
|
||||
}
|
||||
|
||||
impl std::error::Error for Error {}
|
||||
|
||||
impl Display for ErrorCode {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match *self {
|
||||
|
@ -500,6 +502,13 @@ impl Mpv {
|
|||
}
|
||||
}
|
||||
|
||||
/// Run a custom command.
|
||||
/// This should only be used if the desired command is not implemented
|
||||
/// with [MpvCommand].
|
||||
pub fn run_command_raw(&self, command: &str, args: &[&str]) -> Result<(), Error> {
|
||||
run_mpv_command(self, command, args)
|
||||
}
|
||||
|
||||
pub fn playlist_add(
|
||||
&self,
|
||||
file: &str,
|
||||
|
|
Loading…
Reference in New Issue