mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-22 16:10:31 +00:00
fix: reset video stream sizes on audio track selection
This commit is contained in:
parent
694418d30d
commit
39a5c8bdfb
@ -261,6 +261,7 @@ public class DownloadDialog extends DialogFragment
|
|||||||
final StreamSizeWrapper<AudioStream> audioStreams = getWrappedAudioStreams();
|
final StreamSizeWrapper<AudioStream> audioStreams = getWrappedAudioStreams();
|
||||||
final var secondaryStreams = new SparseArrayCompat<SecondaryStreamHelper<AudioStream>>(4);
|
final var secondaryStreams = new SparseArrayCompat<SecondaryStreamHelper<AudioStream>>(4);
|
||||||
final List<VideoStream> videoStreams = wrappedVideoStreams.getStreamsList();
|
final List<VideoStream> videoStreams = wrappedVideoStreams.getStreamsList();
|
||||||
|
wrappedVideoStreams.resetSizes();
|
||||||
|
|
||||||
for (int i = 0; i < videoStreams.size(); i++) {
|
for (int i = 0; i < videoStreams.size(); i++) {
|
||||||
if (!videoStreams.get(i).isVideoOnly()) {
|
if (!videoStreams.get(i).isVideoOnly()) {
|
||||||
|
@ -235,7 +235,7 @@ public class StreamItemAdapter<T extends Stream, U extends Stream> extends BaseA
|
|||||||
this.unknownSize = context == null
|
this.unknownSize = context == null
|
||||||
? "--.-" : context.getString(R.string.unknown_content);
|
? "--.-" : context.getString(R.string.unknown_content);
|
||||||
|
|
||||||
Arrays.fill(streamSizes, -2);
|
resetSizes();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -269,6 +269,10 @@ public class StreamItemAdapter<T extends Stream, U extends Stream> extends BaseA
|
|||||||
.onErrorReturnItem(true);
|
.onErrorReturnItem(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void resetSizes() {
|
||||||
|
Arrays.fill(streamSizes, -2);
|
||||||
|
}
|
||||||
|
|
||||||
public static <X extends Stream> StreamSizeWrapper<X> empty() {
|
public static <X extends Stream> StreamSizeWrapper<X> empty() {
|
||||||
//noinspection unchecked
|
//noinspection unchecked
|
||||||
return (StreamSizeWrapper<X>) EMPTY;
|
return (StreamSizeWrapper<X>) EMPTY;
|
||||||
|
Loading…
Reference in New Issue
Block a user