-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
Fix media details tag for multiple versions support #3336
Fix media details tag for multiple versions support #3336
Conversation
if (stream.getChannelLayout() != null && stream.getChannelLayout().trim().length() > 0) { | ||
addBlockText(context, layout, stream.getChannelLayout().toUpperCase()); | ||
if (audioStream.getChannelLayout() != null && audioStream.getChannelLayout().trim().length() > 0) { | ||
addBlockText(context, layout, audioStream.getChannelLayout().toUpperCase()); |
Check warning
Code scanning / Android Lint
Implied default locale in case conversion Warning
app/src/main/java/org/jellyfin/androidtv/util/InfoLayoutHelper.java
Outdated
Show resolved
Hide resolved
@@ -48,66 +48,64 @@ | |||
} | |||
} | |||
|
|||
public static void addInfoRow(Context context, BaseItemDto item, LinearLayout layout, boolean includeRuntime, boolean includeEndTime) { |
Check notice
Code scanning / Android Lint
Unknown nullness Note
@@ -48,66 +48,64 @@ | |||
} | |||
} | |||
|
|||
public static void addInfoRow(Context context, BaseItemDto item, LinearLayout layout, boolean includeRuntime, boolean includeEndTime) { |
Check notice
Code scanning / Android Lint
Unknown nullness Note
@@ -48,66 +48,64 @@ | |||
} | |||
} | |||
|
|||
public static void addInfoRow(Context context, BaseItemDto item, LinearLayout layout, boolean includeRuntime, boolean includeEndTime) { |
Check notice
Code scanning / Android Lint
Unknown nullness Note
Awesome, thanks! |
@@ -125,22 +125,22 @@ | |||
if (item.getMovieCount() != null && item.getMovieCount() > 0) { | |||
TextView amt = new TextView(context); | |||
amt.setTextSize(textSize); | |||
amt.setText(item.getMovieCount().toString()+" "+context.getResources().getString(R.string.lbl_movies)+" "); | |||
amt.setText(item.getMovieCount().toString() + " " + context.getResources().getString(R.string.lbl_movies) + " "); |
Check warning
Code scanning / Android Lint
TextView Internationalization Warning
layout.addView(amt); | ||
hasSpecificCounts = true; | ||
|
||
} | ||
if (item.getSeriesCount() != null && item.getSeriesCount() > 0) { | ||
TextView amt = new TextView(context); | ||
amt.setTextSize(textSize); | ||
amt.setText(item.getSeriesCount().toString()+" "+context.getResources().getString(R.string.lbl_tv_series)+" "); | ||
amt.setText(item.getSeriesCount().toString() + " " + context.getResources().getString(R.string.lbl_tv_series) + " "); |
Check warning
Code scanning / Android Lint
TextView Internationalization Warning
layout.addView(amt); | ||
hasSpecificCounts = true; | ||
} | ||
if (!hasSpecificCounts && item.getChildCount() != null && item.getChildCount() > 0) { | ||
TextView amt = new TextView(context); | ||
amt.setTextSize(textSize); | ||
amt.setText(item.getChildCount().toString()+" "+ context.getResources().getString(item.getChildCount() > 1 ? R.string.lbl_items : R.string.lbl_item) +" "); | ||
amt.setText(item.getChildCount().toString() + " " + context.getResources().getString(item.getChildCount() > 1 ? R.string.lbl_items : R.string.lbl_item) + " "); |
Check warning
Code scanning / Android Lint
TextView Internationalization Warning
@@ -150,7 +150,7 @@ | |||
if (count != null && count > 0) { | |||
TextView amt = new TextView(context); | |||
amt.setTextSize(textSize); | |||
amt.setText(count.toString()+" "+ label +" "); | |||
amt.setText(count.toString() + " " + label + " "); |
Check warning
Code scanning / Android Lint
TextView Internationalization Warning
case "ac3": codec = "DD"; break; | ||
default: codec = stream.getCodec().toUpperCase(); | ||
} else if (audioStream.getCodec() != null & audioStream.getCodec().trim().length() > 0) { | ||
switch (audioStream.getCodec().toLowerCase()) { |
Check warning
Code scanning / Android Lint
Implied default locale in case conversion Warning
layout.addView(amt); | ||
hasSpecificCounts = true; | ||
} | ||
if (!hasSpecificCounts && item.getChildCount() != null && item.getChildCount() > 0) { | ||
TextView amt = new TextView(context); | ||
amt.setTextSize(textSize); | ||
amt.setText(item.getChildCount().toString()+" "+ context.getResources().getString(item.getChildCount() > 1 ? R.string.lbl_items : R.string.lbl_item) +" "); | ||
amt.setText(item.getChildCount().toString() + " " + context.getResources().getString(item.getChildCount() > 1 ? R.string.lbl_items : R.string.lbl_item) + " "); |
Check warning
Code scanning / Android Lint
TextView Internationalization Warning
@@ -150,7 +150,7 @@ | |||
if (count != null && count > 0) { | |||
TextView amt = new TextView(context); | |||
amt.setTextSize(textSize); | |||
amt.setText(count.toString()+" "+ label +" "); | |||
amt.setText(count.toString() + " " + label + " "); |
Check warning
Code scanning / Android Lint
TextView Internationalization Warning
@@ -159,13 +159,13 @@ | |||
if (item.getAirDays() != null && item.getAirDays().size() > 0) { | |||
TextView textView = new TextView(context); | |||
textView.setTextSize(textSize); | |||
textView.setText(item.getAirDays().get(0) + " " + Utils.getSafeValue(item.getAirTime(), "") + " "); | |||
textView.setText(item.getAirDays().get(0) + " " + Utils.getSafeValue(item.getAirTime(), "") + " "); |
Check warning
Code scanning / Android Lint
TextView Internationalization Warning
@@ -175,7 +175,7 @@ | |||
private static void addProgramInfo(@NonNull Context context, BaseItemDto item, LinearLayout layout) { | |||
TextView name = new TextView(context); | |||
name.setTextSize(textSize); | |||
name.setText(BaseItemExtensionsKt.getProgramSubText(item, context)+" "); | |||
name.setText(BaseItemExtensionsKt.getProgramSubText(item, context) + " "); |
Check warning
Code scanning / Android Lint
TextView Internationalization Warning
@@ -261,7 +261,7 @@ | |||
layout.addView(tomato); | |||
TextView amt = new TextView(context); | |||
amt.setTextSize(textSize); | |||
amt.setText(nfp.format(item.getCriticRating()/100) + " "); | |||
amt.setText(nfp.format(item.getCriticRating() / 100) + " "); |
Check warning
Code scanning / Android Lint
TextView Internationalization Warning
Changes
Changes the media details tag to check the audio stream based on the media source index.
Fixes
Currently, the media details tag only reflects the first movie regardless of the version selected.