Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "auto" max bit rate and add additional values #3372

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

nielsvanvelzen
Copy link
Member

Changes

  • Remove "auto" max bitrate preference
    • A value of "0" will now default to the default value of 100Mbit/s
  • Add new values for max bitrate: 140Mbit/s, 180Mbit/s and 200Mbit/s
  • Require UserPreferences as parameter in Utils.getMaxBitrate

Issues

@nielsvanvelzen nielsvanvelzen added the enhancement New feature or request label Feb 14, 2024
@nielsvanvelzen nielsvanvelzen added this to the v0.17.0 milestone Feb 14, 2024
if (maxRate == "0") maxRate = UserPreferences.maxBitrate.defaultValue

// Convert megabit to bit
return (maxRate.toFloat() * 1_000_000).toInt()

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
@nielsvanvelzen nielsvanvelzen merged commit 0476a66 into jellyfin:master Feb 14, 2024
5 checks passed
@nielsvanvelzen nielsvanvelzen deleted the max-bitrate branch February 14, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants