Merge pull request #2178 from mfietz/issue/2176-application-octet-stream

Accept 'application/octet-stream' as valid media mime type
This commit is contained in:
Martin Fietz 2016-11-07 19:05:31 +01:00 committed by GitHub
commit cceb9425a6
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() {