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

Add Video Codec Tag #2245

Merged
merged 1 commit into from
Nov 8, 2022
Merged

Conversation

The-Randalorian
Copy link
Contributor

Add Video Codec Tag to Item View Page

Changes
Adds an additional tag to Created addVideoCodecDetails function to InfoLayoutHelper.java. The function is called by addRatingAndRes in the same file to add a tag with the codec name after the resolution tag.

Issues
Fixes #2244

@nielsvanvelzen nielsvanvelzen added the enhancement New feature or request label Nov 8, 2022
private static void addVideoCodecDetails(Context context, LinearLayout layout, MediaStream stream) {
if (stream != null) {
if (stream.getCodec() != null && stream.getCodec().trim().length() > 0) {
String codec = stream.getCodec().toUpperCase();

Check warning

Code scanning / Android Lint

Implied default locale in case conversion

Implicitly using the default locale is a common source of bugs: Use toUpperCase(Locale) instead. For strings meant to be internal use Locale.ROOT, otherwise Locale.getDefault().
Copy link
Member

@nielsvanvelzen nielsvanvelzen left a comment

Choose a reason for hiding this comment

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

Works as expected, thanks!

@nielsvanvelzen nielsvanvelzen added this to the v0.15.0 milestone Nov 8, 2022
@nielsvanvelzen nielsvanvelzen merged commit 0619cbd into jellyfin:master Nov 8, 2022
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.

Update existing feature
2 participants