Included observation ID in PropertyChange event

This commit is contained in:
Jonas Frei
2019-06-20 05:58:31 +02:00
parent d5ecc48b1d
commit 5b28c95a0a
4 changed files with 4 additions and 7 deletions

View File

@@ -26,7 +26,7 @@ fn main() -> Result<(), Error> {
loop {
let event = mpv.event_listen()?;
match event {
Event::PropertyChange(property) => match property {
Event::PropertyChange(_, property) => match property {
Property::Path(Some(value)) => println!("\nPlaying: {}", value),
Property::Path(None) => (),
Property::Pause(value) => pause = value,
@@ -52,7 +52,6 @@ fn main() -> Result<(), Error> {
Property::Metadata(None) => (),
Property::Unknown {
name: _,
id: _,
data: _,
} => (),
},