Accept 'application/octet-stream' as valid media mime type

This commit is contained in:
Martin Fietz 2016-11-04 22:35:41 +01:00
parent ffa65ef00e
commit 527dfe737e
1 changed files with 10 additions and 3 deletions

View File

@ -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() {