🚧 Don’t cancel on archive manifests
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 12 Sep 2022 18:55:28 +0000 (20:55 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 12 Sep 2022 18:55:28 +0000 (20:55 +0200)
src/main/java/net/pterodactylus/sone/core/FreenetInterface.java

index 066747d..0f05fc7 100644 (file)
@@ -179,6 +179,9 @@ public class FreenetInterface {
                SnoopMetadata snoop = new SnoopMetadata() {
                        @Override
                        public boolean snoopMetadata(Metadata meta, ClientContext context) {
+                               if (meta.isArchiveManifest()) {
+                                       return false;
+                               }
                                String mimeType = meta.getMIMEType();
                                boolean cancel = (mimeType == null) || backgroundFetchCallback.shouldCancel(uri, mimeType, meta.dataLength());
                                if (cancel) {