Player: Improver human-facing error message.

This commit is contained in:
Jordan Petridis 2018-07-18 16:15:38 +03:00
parent 5e38f41530
commit 671a31a95a
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6

View File

@ -293,9 +293,10 @@ impl PlayerWidget {
s.player.connect_warning(move |_, warn| warn!("gst warning: {}", warn)); s.player.connect_warning(move |_, warn| warn!("gst warning: {}", warn));
// Log gst errors. // Log gst errors.
s.player.connect_error(clone!(sender => move |_, error| { s.player.connect_error(clone!(sender => move |_, _error| {
// FIXME: should never occur and should not be user facing. // sender.send(Action::ErrorNotification(format!("Player Error: {}", error)));
sender.send(Action::ErrorNotification(format!("Player Error: {}", error))); let s = "The media player was unable to execute an action.".into();
sender.send(Action::ErrorNotification(s));
})); }));
// The followign callbacks require `Send` but are handled by the gtk main loop // The followign callbacks require `Send` but are handled by the gtk main loop