Skip to content

Commit

Permalink
Fix track format labels
Browse files Browse the repository at this point in the history
  • Loading branch information
moneytoo committed Jul 11, 2024
1 parent 942bd63 commit 1897df9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
applicationId "com.brouken.player"
minSdkVersion 21
targetSdkVersion 34
versionCode 163
versionCode 164
versionName "0.${versionCode}"
archivesBaseName = "Just.Player.v${versionName}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ public String getTrackName(Format format) {
String trackName = super.getTrackName(format);
if (format.sampleMimeType != null) {
String sampleFormat = formatNameFromMime(format.sampleMimeType);
if (BuildConfig.DEBUG && sampleFormat == null) {
if (sampleFormat == null) {
sampleFormat = formatNameFromMime(format.codecs);
}
if (sampleFormat == null) {
sampleFormat = format.sampleMimeType;
}
trackName += " (" + sampleFormat + ")";
if (sampleFormat != null) {
trackName += " (" + sampleFormat + ")";
}
}
if (format.label != null) {
if (!trackName.startsWith(format.label)) { // HACK
Expand Down

0 comments on commit 1897df9

Please sign in to comment.