mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 08:21:59 +02:00
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:
12
clapper_src/controls.js
vendored
12
clapper_src/controls.js
vendored
@@ -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 */
|
||||
|
Reference in New Issue
Block a user