warn on failed seek
This commit is contained in:
parent
26449b9dcf
commit
d2025102e6
1 changed files with 6 additions and 2 deletions
|
@ -182,8 +182,12 @@ public class Playbin : GLib.Object {
|
|||
}
|
||||
|
||||
public void seek (double position) {
|
||||
var rc = this.mpv.command ({"seek", position.to_string (), "absolute"});
|
||||
if (rc < 0) {
|
||||
warning (@"could not seek to $position: $rc");
|
||||
} else {
|
||||
this.position = position;
|
||||
assert (this.mpv.command ({"seek", position.to_string (), "absolute"}) >= 0);
|
||||
}
|
||||
}
|
||||
|
||||
// manually changes which track in the play queue to play
|
||||
|
|
Loading…
Reference in a new issue