Fix video does not continuing from previous progress when opened

This commit is contained in:
Brahim Hadriche committed 2025-05-20 12:27:21 -04:00
1 parent f681a7024c
commit d2fbd59d6a
6 files changed
+31 -2

No files matched your search

@@ -471,7 +471,6 @@ function SeekToPercentOfDuration() as void
if seekToPercent = invalid
return
end if
m.seekToPercent = invalid
duration = m.top.duration
if duration = 0
@@ -485,6 +484,7 @@ function SeekToPercentOfDuration() as void
return
end if
m.seekToPercent = invalid
seek = (MathUtils.Clamp(seekToPercent, 0, 100) / 100.0) * duration
if seek > 0
LogInfo("Seeking to percent duration watched", seek)
@@ -44,6 +44,12 @@ namespace Http
return true
end if
if IsString(payload.timestamp)
payload.timestamp = payload.timestamp.toInt()
else if IsString(payload.percentDurationWatched)
payload.percentDurationWatched = payload.percentDurationWatched.toFloat()
end if
instance = m.invidiousService.GetInstance()
contentNode = InvidiousContent.ToRowCellContentNode(payload, instance)
@@ -79,6 +85,8 @@ namespace Http
if IsString(payload.timestamp)
payload.timestamp = payload.timestamp.toInt()
else if IsString(payload.percentDurationWatched)
payload.percentDurationWatched = payload.percentDurationWatched.toFloat()
end if
instance = m.invidiousService.GetInstance()