Skip to content

Conversation

@absidue
Copy link
Member

@absidue absidue commented Apr 17, 2025

Adjust default playback rate to the maximum value when it is too large

Pull Request Type

  • Bugfix

Related issue

Description

This pull request adjusts the default playback rate to the configured maxmium playback rate when the default is larger than it.

Testing

  1. Set the maximum playback rate to 6x
  2. Set the default playback rate to 6x
  3. Set the maximum playback rate to 3x
  4. The default playback rate should have been set to 3x
  5. Go to the watch page to confirm

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 7f56fa1

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) April 17, 2025 20:47
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 17, 2025
PikachuEXE
PikachuEXE previously approved these changes Apr 17, 2025
@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Apr 18, 2025

It should do the same when you adjust the Rate Interval

VirtualBoxVM_c5ZR7jfbT8.mp4

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Apr 18, 2025
@PikachuEXE
Copy link
Collaborator

I would say that could be out of scope of this PR
As the title is
Adjust default playback rate to the maximum value not the interval
However if it's easy enough to implement might as well do it in one PR

@efb4f5ff-1298-471a-8973-3d47447115dc

This case was pointed out in #7184 and this PR is based on that. That case isnt implemented here by accident

@efb4f5ff-1298-471a-8973-3d47447115dc

Some context on how should it should be handled:

  1. Current Playback Rate e.g. 8.3x
  2. Take new Interval Rate e.g. 0.25
  3. Divide current Playback Rate by Interval 8.3 / 0.25 = 33.2
  4. Round that number to the integer that is closest to it in this case that would be 33
  5. Multiply that number with the Interval 33 * 0.25 = 8.25x

@absidue absidue force-pushed the playback-rate-default branch from 79efa19 to 4e11cc8 Compare May 9, 2025 18:07
@absidue absidue added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: changes requested labels May 9, 2025
@FreeTubeBot FreeTubeBot merged commit 01d8ae4 into FreeTubeApp:development May 10, 2025
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label May 10, 2025
@absidue absidue deleted the playback-rate-default branch May 10, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants