This commit is contained in:
Martin Fietz 2016-11-27 10:44:49 +01:00
parent cf8deb12ef
commit 4ff8d5430f
1 changed files with 7 additions and 12 deletions

View File

@ -53,19 +53,14 @@ public class NSRSS20 extends Namespace {
} else if (ENCLOSURE.equals(localName)) { } else if (ENCLOSURE.equals(localName)) {
String type = attributes.getValue(ENC_TYPE); String type = attributes.getValue(ENC_TYPE);
String url = attributes.getValue(ENC_URL); String url = attributes.getValue(ENC_URL);
boolean validType = false;
boolean validUrl = !TextUtils.isEmpty(url);
if(SyndTypeUtils.enclosureTypeValid(type)) { boolean validType = SyndTypeUtils.enclosureTypeValid(type);
validType = true; if(!validType) {
} else {
type = SyndTypeUtils.getMimeTypeFromUrl(url); type = SyndTypeUtils.getMimeTypeFromUrl(url);
validType = SyndTypeUtils.enclosureTypeValid(type);
} }
if(SyndTypeUtils.enclosureTypeValid(type)) { boolean validUrl = !TextUtils.isEmpty(url);
validType = true;
}
if (state.getCurrentItem() != null && state.getCurrentItem().getMedia() == null && if (state.getCurrentItem() != null && state.getCurrentItem().getMedia() == null &&
validType && validUrl) { validType && validUrl) {
long size = 0; long size = 0;