Merge pull request #2906 from kapodamy/opus-fixup
add opus file extension
This commit is contained in:
commit
72151c8c0c
2 changed files with 19 additions and 3 deletions
|
@ -559,8 +559,16 @@ 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();
|
||||||
mime = format.mimeType;
|
switch(format) {
|
||||||
filename += format.suffix;
|
case WEBMA_OPUS:
|
||||||
|
mime = "audio/ogg";
|
||||||
|
filename += "opus";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
mime = format.mimeType;
|
||||||
|
filename += format.suffix;
|
||||||
|
break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.video_button:
|
case R.id.video_button:
|
||||||
mainStorage = mainStorageVideo;
|
mainStorage = mainStorageVideo;
|
||||||
|
|
|
@ -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 {
|
||||||
formatNameView.setText(stream.getFormat().getName());
|
switch (stream.getFormat()) {
|
||||||
|
case WEBMA_OPUS:
|
||||||
|
// noinspection AndroidLintSetTextI18n
|
||||||
|
formatNameView.setText("opus");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
formatNameView.setText(stream.getFormat().getName());
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
qualityView.setText(qualityString);
|
qualityView.setText(qualityString);
|
||||||
|
|
Loading…
Reference in a new issue