dont seek if the playbar doesnt have a duration

This commit is contained in:
Erica Z 2024-10-20 13:37:33 +02:00
parent d2025102e6
commit f09a89140d

View file

@ -12,7 +12,9 @@ class Ui.Playbar : Gtk.Box {
} }
[GtkCallback] private bool on_play_position_seek (Gtk.Range range, Gtk.ScrollType scroll_type, double value) { [GtkCallback] private bool on_play_position_seek (Gtk.Range range, Gtk.ScrollType scroll_type, double value) {
if (range.adjustment.lower < range.adjustment.upper) {
this.playbin.seek ((int64) value); this.playbin.seek ((int64) value);
}
return false; return false;
} }