Skip to content

Commit

Permalink
Add Video Codec Tag
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Randalorian authored and nielsvanvelzen committed Nov 8, 2022
1 parent f53dba8 commit 0619cbd
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,10 @@ private static void addRatingAndRes(Context context, BaseItemDto item, LinearLay
addBlockText(context, layout, "8K");
}

addSpacer(context, layout, " ");
addSpacer(context, layout, " ");

addVideoCodecDetails(context, layout, item.getMediaStreams().get(0));

}
if (Utils.isTrue(item.getHasSubtitles())) {
addBlockText(context, layout, "CC");
Expand All @@ -363,6 +366,16 @@ private static void addSeriesStatus(Context context, BaseItemDto item, LinearLay
}
}

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();
addBlockText(context, layout, codec);
addSpacer(context, layout, " ");
}
}
}

private static void addMediaDetails(Context context, MediaStream stream, LinearLayout layout) {

if (stream != null) {
Expand Down

0 comments on commit 0619cbd

Please sign in to comment.