mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-02-04 04:27:36 +01:00
Refactor
This commit is contained in:
parent
cf8deb12ef
commit
4ff8d5430f
@ -53,20 +53,15 @@ public class NSRSS20 extends Namespace {
|
||||
} else if (ENCLOSURE.equals(localName)) {
|
||||
String type = attributes.getValue(ENC_TYPE);
|
||||
String url = attributes.getValue(ENC_URL);
|
||||
boolean validType = false;
|
||||
boolean validUrl = !TextUtils.isEmpty(url);
|
||||
|
||||
if(SyndTypeUtils.enclosureTypeValid(type)) {
|
||||
validType = true;
|
||||
} else {
|
||||
type = SyndTypeUtils.getMimeTypeFromUrl(url);
|
||||
}
|
||||
boolean validType = SyndTypeUtils.enclosureTypeValid(type);
|
||||
if(!validType) {
|
||||
type = SyndTypeUtils.getMimeTypeFromUrl(url);
|
||||
validType = SyndTypeUtils.enclosureTypeValid(type);
|
||||
}
|
||||
|
||||
if(SyndTypeUtils.enclosureTypeValid(type)) {
|
||||
validType = true;
|
||||
}
|
||||
|
||||
if (state.getCurrentItem() != null && state.getCurrentItem().getMedia() == null &&
|
||||
boolean validUrl = !TextUtils.isEmpty(url);
|
||||
if (state.getCurrentItem() != null && state.getCurrentItem().getMedia() == null &&
|
||||
validType && validUrl) {
|
||||
long size = 0;
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user