From 527dfe737ebc2effc81b66c417bc4ee6f33c19a5 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Fri, 4 Nov 2016 22:35:41 +0100 Subject: [PATCH] Accept 'application/octet-stream' as valid media mime type --- .../core/syndication/util/SyndTypeUtils.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/syndication/util/SyndTypeUtils.java b/core/src/main/java/de/danoeh/antennapod/core/syndication/util/SyndTypeUtils.java index 5b12fa772..1d564ab0e 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/syndication/util/SyndTypeUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/syndication/util/SyndTypeUtils.java @@ -1,15 +1,22 @@ package de.danoeh.antennapod.core.syndication.util; +import android.text.TextUtils; import android.webkit.MimeTypeMap; + import org.apache.commons.io.FilenameUtils; +import java.util.Arrays; + /** Utility class for handling MIME-Types of enclosures */ public class SyndTypeUtils { - private static final String VALID_MEDIA_MIMETYPE = "audio/.*" + "|" + "video/.*" - + "|" + "application/ogg"; - private static final String VALID_IMAGE_MIMETYPE = "image/.*"; + private static final String VALID_MEDIA_MIMETYPE = TextUtils.join("|", Arrays.asList( + "audio/.*", + "video/.*", + "application/ogg", + "application/octet-stream")); + private static final String VALID_IMAGE_MIMETYPE = "image/.*"; private SyndTypeUtils() {