diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java index 2295c3c7a..7dd482b21 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java @@ -261,6 +261,7 @@ public class DownloadDialog extends DialogFragment final StreamSizeWrapper audioStreams = getWrappedAudioStreams(); final var secondaryStreams = new SparseArrayCompat>(4); final List videoStreams = wrappedVideoStreams.getStreamsList(); + wrappedVideoStreams.resetSizes(); for (int i = 0; i < videoStreams.size(); i++) { if (!videoStreams.get(i).isVideoOnly()) { diff --git a/app/src/main/java/org/schabi/newpipe/util/StreamItemAdapter.java b/app/src/main/java/org/schabi/newpipe/util/StreamItemAdapter.java index 74de45720..4bcdfd02a 100644 --- a/app/src/main/java/org/schabi/newpipe/util/StreamItemAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/util/StreamItemAdapter.java @@ -235,7 +235,7 @@ public class StreamItemAdapter extends BaseA this.unknownSize = context == null ? "--.-" : context.getString(R.string.unknown_content); - Arrays.fill(streamSizes, -2); + resetSizes(); } /** @@ -269,6 +269,10 @@ public class StreamItemAdapter extends BaseA .onErrorReturnItem(true); } + public void resetSizes() { + Arrays.fill(streamSizes, -2); + } + public static StreamSizeWrapper empty() { //noinspection unchecked return (StreamSizeWrapper) EMPTY;