kopia lustrzana https://github.com/TeamNewPipe/NewPipe
fix: audio stream cache key, code fmt
rodzic
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)
|
||||
|
|
Ładowanie…
Reference in New Issue