1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-22 02:53:09 +01:00

Add Open in browser button to audio external players dialog

This change makes the dialog consistent with the video one.
This commit is contained in:
AudricV 2023-05-02 00:18:46 +02:00
parent d89a3c6c4d
commit 023f6166ab
No known key found for this signature in database
GPG Key ID: DA92EC7905614198

View File

@ -2166,12 +2166,13 @@ public final class VideoDetailFragment
if (audioTracks.isEmpty()) {
Toast.makeText(activity, R.string.no_audio_streams_available_for_external_players,
Toast.LENGTH_SHORT).show();
} else if (audioTracks.size() == 1) {
startOnExternalPlayer(activity, currentInfo, audioTracks.get(0));
} else {
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(R.string.select_audio_track_external_players);
builder.setNeutralButton(R.string.open_in_browser, (dialog, i) ->
ShareUtils.openUrlInBrowser(requireActivity(), url));
final int selectedAudioStream =
ListHelper.getDefaultAudioFormat(activity, audioTracks);