diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2016-11-04 22:35:41 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2016-11-04 22:35:41 +0100 |
commit | 527dfe737ebc2effc81b66c417bc4ee6f33c19a5 (patch) | |
tree | 1756a46379609b7fb6a373160b2d6d72a65f9836 | |
parent | ffa65ef00ecb4d5eb36ebd3b3e3c08b3fbb1f23a (diff) | |
download | AntennaPod-527dfe737ebc2effc81b66c417bc4ee6f33c19a5.zip |
Accept 'application/octet-stream' as valid media mime type
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/syndication/util/SyndTypeUtils.java | 13 |
1 files 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() { |