Code improvements here and there

pull/8153/head
Stypox 2022-05-21 12:02:57 +02:00 zatwierdzone przez AudricV
rodzic e5ffa2aa09
commit 8dad6d7e1c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DA92EC7905614198
3 zmienionych plików z 31 dodań i 31 usunięć

Wyświetl plik

@ -786,11 +786,9 @@ public class DownloadDialog extends DialogFragment
if (format == MediaFormat.TTML) {
filenameTmp += MediaFormat.SRT.suffix;
} else {
if (format != null) {
} else if (format != null) {
filenameTmp += format.suffix;
}
}
break;
default:
throw new RuntimeException("No stream selected");

Wyświetl plik

@ -35,7 +35,10 @@ public class SecondaryStreamHelper<T extends Stream> {
public static AudioStream getAudioStreamFor(@NonNull final List<AudioStream> audioStreams,
@NonNull final VideoStream videoStream) {
final MediaFormat mediaFormat = videoStream.getFormat();
if (mediaFormat != null) {
if (mediaFormat == null) {
return null;
}
switch (mediaFormat) {
case WEBM:
case MPEG_4:// ¿is mpeg-4 DASH?
@ -63,7 +66,6 @@ public class SecondaryStreamHelper<T extends Stream> {
return audio;
}
}
}
return null;
}

Wyświetl plik

@ -155,10 +155,10 @@ public class StreamItemAdapter<T extends Stream, U extends Stream> extends BaseA
qualityString += " (" + context.getString(R.string.caption_auto_generated) + ")";
}
} else {
if (mediaFormat != null) {
qualityString = mediaFormat.getSuffix();
} else {
if (mediaFormat == null) {
qualityString = context.getString(R.string.unknown_quality);
} else {
qualityString = mediaFormat.getSuffix();
}
}