Fix update media end time

This commit is contained in:
Rafostar
2020-10-23 10:26:11 +02:00
parent e7a39d6af8
commit 576440faff
4 changed files with 21 additions and 17 deletions

View File

@@ -223,6 +223,9 @@ var Widget = GObject.registerClass({
updateTime()
{
if(!this.revealerTop.visible)
return null;
let currTime = GLib.DateTime.new_now_local();
let endTime = currTime.add_seconds(
this.controls.positionAdjustment.get_upper() - this.controls.currentPosition
@@ -338,9 +341,8 @@ var Widget = GObject.registerClass({
{
if(
!this.isSeekable
|| !player.seek_done
|| this.controls.isPositionSeeking
|| player.state === GstPlayer.PlayerState.BUFFERING
|| !player.seek_done
)
return;
@@ -348,7 +350,6 @@ var Widget = GObject.registerClass({
if(positionSeconds === this.controls.currentPosition)
return;
this.controls.currentPosition = positionSeconds;
this.controls.positionScale.set_value(positionSeconds);
}