mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-11-05 01:26:23 +00:00
fix: audio stream cache key, code fmt
This commit is contained in:
parent
4e837e838d
commit
22671ca16c
@ -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
|
||||
|
@ -451,8 +451,10 @@ public class ListHelperTest {
|
||||
}
|
||||
|
||||
private static AudioStream generateAudioTrack(
|
||||
@NonNull final String id, @Nullable final String trackId,
|
||||
@Nullable final Locale locale, @Nullable final AudioTrackType trackType) {
|
||||
@NonNull final String id,
|
||||
@Nullable final String trackId,
|
||||
@Nullable final Locale locale,
|
||||
@Nullable final AudioTrackType trackType) {
|
||||
return new AudioStream.Builder()
|
||||
.setId(id)
|
||||
.setContent("", true)
|
||||
|
Loading…
Reference in New Issue
Block a user