PlayerWidget: Remove an .expect() occurrence.
This commit is contained in:
parent
a596b62a5f
commit
2fcb8d915d
@ -286,8 +286,7 @@ impl PlayerWidget {
|
|||||||
// path is an absolute fs path ex. "foo/bar/baz".
|
// path is an absolute fs path ex. "foo/bar/baz".
|
||||||
// Convert it so it will have a "file:///"
|
// Convert it so it will have a "file:///"
|
||||||
// FIXME: convert it properly
|
// FIXME: convert it properly
|
||||||
let uri = File::new_for_path(path).get_uri().expect("Bad file path");
|
if let Some(uri) = File::new_for_path(path).get_uri() {
|
||||||
|
|
||||||
// FIXME: Maybe should also reset/flush the pipeline and then add the file?
|
// FIXME: Maybe should also reset/flush the pipeline and then add the file?
|
||||||
|
|
||||||
// play the file
|
// play the file
|
||||||
@ -295,11 +294,13 @@ impl PlayerWidget {
|
|||||||
self.play();
|
self.play();
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// TODO: log an error
|
// TODO: log an error
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stream stuff
|
// FIXME: Stream stuff
|
||||||
unimplemented!()
|
// unimplemented!()
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_update_slider(slider: >k::Scale, player: &gst_player::Player) -> SignalHandlerId {
|
fn connect_update_slider(slider: >k::Scale, player: &gst_player::Player) -> SignalHandlerId {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user