Fallback to mime type from the URL when the defined is invalid

This commit is contained in:
Cj Malone 2016-11-22 19:14:35 +00:00
parent 7f29627ac7
commit 65d6cea22a
1 changed files with 3 additions and 1 deletions

View File

@ -56,7 +56,9 @@ public class NSRSS20 extends Namespace {
boolean validType = false; boolean validType = false;
boolean validUrl = !TextUtils.isEmpty(url); boolean validUrl = !TextUtils.isEmpty(url);
if (type == null) { if(SyndTypeUtils.enclosureTypeValid(type)) {
validType = true;
} else {
type = SyndTypeUtils.getMimeTypeFromUrl(url); type = SyndTypeUtils.getMimeTypeFromUrl(url);
} }