fixup
* [DownloadDialog.java] use *.opus extension instead of *.webm (bad change from 844f80a5f1
)
* [StreamItemAdapter.java] show "opus" in format label instead of "WebM Opus"
This commit is contained in:
parent
1df852171d
commit
8d53b07167
|
@ -559,9 +559,17 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck
|
||||||
case R.id.audio_button:
|
case R.id.audio_button:
|
||||||
mainStorage = mainStorageAudio;
|
mainStorage = mainStorageAudio;
|
||||||
format = audioStreamsAdapter.getItem(selectedAudioIndex).getFormat();
|
format = audioStreamsAdapter.getItem(selectedAudioIndex).getFormat();
|
||||||
|
switch(format) {
|
||||||
|
case WEBMA_OPUS:
|
||||||
|
mime = "audio/ogg";
|
||||||
|
filename += "opus";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
mime = format.mimeType;
|
mime = format.mimeType;
|
||||||
filename += format.suffix;
|
filename += format.suffix;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case R.id.video_button:
|
case R.id.video_button:
|
||||||
mainStorage = mainStorageVideo;
|
mainStorage = mainStorageVideo;
|
||||||
format = videoStreamsAdapter.getItem(selectedVideoIndex).getFormat();
|
format = videoStreamsAdapter.getItem(selectedVideoIndex).getFormat();
|
||||||
|
|
|
@ -140,7 +140,15 @@ public class StreamItemAdapter<T extends Stream, U extends Stream> extends BaseA
|
||||||
if (stream instanceof SubtitlesStream) {
|
if (stream instanceof SubtitlesStream) {
|
||||||
formatNameView.setText(((SubtitlesStream) stream).getLanguageTag());
|
formatNameView.setText(((SubtitlesStream) stream).getLanguageTag());
|
||||||
} else {
|
} else {
|
||||||
|
switch (stream.getFormat()) {
|
||||||
|
case WEBMA_OPUS:
|
||||||
|
// noinspection AndroidLintSetTextI18n
|
||||||
|
formatNameView.setText("opus");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
formatNameView.setText(stream.getFormat().getName());
|
formatNameView.setText(stream.getFormat().getName());
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
qualityView.setText(qualityString);
|
qualityView.setText(qualityString);
|
||||||
|
|
Loading…
Reference in New Issue