Do not do fast seeks when seeking to chapter

Fast seeks are always a little off from requested time. When seeking to chapter position, do it by using a normal seek and restore user selected fast seeks afterwards.
This commit is contained in:
Rafostar
2021-01-13 18:49:10 +01:00
parent df4678d930
commit 5d0876bbf7
3 changed files with 39 additions and 6 deletions

View File

@@ -585,14 +585,22 @@ class ClapperControls extends Gtk.Box
if((this.isPositionDragging = isPositionDragging))
return;
const isChapterSeek = this.chapterPopover.visible;
if(!isPositionDragging)
this._setChapterVisible(false);
const clapperWidget = this.get_ancestor(Gtk.Grid);
if(!clapperWidget) return;
const positionSeconds = Math.round(scale.get_value());
clapperWidget.player.seek_seconds(positionSeconds);
const scaleValue = scale.get_value();
if(!isChapterSeek) {
const positionSeconds = Math.round(scaleValue);
clapperWidget.player.seek_seconds(positionSeconds);
}
else
clapperWidget.player.seek_chapter(scaleValue);
}
/* Only happens when navigating through controls panel */