mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2025-10-05 02:39:29 +02:00
fix: audio stream cache key, code fmt
This commit is contained in:
parent
4e837e838d
commit
22671ca16c
4 changed files with 12 additions and 6 deletions
|
@ -470,9 +470,7 @@ public class DownloadDialog extends DialogFragment
|
|||
dialogBinding.audioTrackSpinner.setVisibility(
|
||||
isVideoOnly && wrappedAudioTracks.size() > 1 ? View.VISIBLE : View.GONE);
|
||||
dialogBinding.defaultAudioTrackPresentText.setVisibility(
|
||||
!isVideoOnly && wrappedAudioTracks.size() > 1 ? View.VISIBLE : View.GONE
|
||||
|
||||
);
|
||||
!isVideoOnly && wrappedAudioTracks.size() > 1 ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
private void setupSubtitleSpinner() {
|
||||
|
|
|
@ -161,6 +161,11 @@ public interface PlaybackResolver extends Resolver<StreamInfo, MediaSource> {
|
|||
cacheKey.append(audioStream.getAudioTrackId());
|
||||
}
|
||||
|
||||
if (audioStream.getAudioLocale() != null) {
|
||||
cacheKey.append(" ");
|
||||
cacheKey.append(audioStream.getAudioLocale().getISO3Language());
|
||||
}
|
||||
|
||||
return cacheKey.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -797,7 +797,8 @@ public final class ListHelper {
|
|||
* @return Comparator
|
||||
*/
|
||||
static Comparator<AudioStream> getAudioTrackComparator(
|
||||
final Locale preferredLanguage, final boolean preferOriginalAudio,
|
||||
final Locale preferredLanguage,
|
||||
final boolean preferOriginalAudio,
|
||||
final boolean preferDescriptiveAudio) {
|
||||
final String langCode = preferredLanguage.getISO3Language();
|
||||
final List<AudioTrackType> trackTypeRanking = preferDescriptiveAudio
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue