Skip to content

Fix: Watch time progress bar inconsistency#9267

Open
Shadorc wants to merge 1 commit into
FreeTubeApp:developmentfrom
Shadorc:fix/watch-time-progress
Open

Fix: Watch time progress bar inconsistency#9267
Shadorc wants to merge 1 commit into
FreeTubeApp:developmentfrom
Shadorc:fix/watch-time-progress

Conversation

@Shadorc

@Shadorc Shadorc commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

closes #3530

Description

Playlist video information is gathered from Innertube with duration precision in seconds (see the references in YouTube.js and FreeTube). However, when watch progress is saved to the database, it uses the Shaka player's getCurrentTime() method, which has millisecond precision. When calculating the watch progress percentage, the calculation divides milliseconds by seconds, for example, 1.412 / 2, which always results in a value less than 100% due to the unit mismatch.

This introduces a small regression, but I have checked and it is exactly the same behaviour on YouTube: if you watch a video with a duration of 1.4s during 1s and close the video, it will be considered as fully watched. It is the same for all video durations, a second started is a second considered fully watched.

Screenshots

image

Testing

See reproduction steps in #3530

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) June 11, 2026 23:59
@github-actions github-actions Bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 11, 2026

@PikachuEXE PikachuEXE left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with #9291 applied

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: waiting for review For PRs that are complete, tested, and ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Watch time progress bar inconsistency

3 participants