diff options
author | Cj Malone <Cj-Malone@users.noreply.github.com> | 2016-07-25 17:27:06 +0100 |
---|---|---|
committer | Cj Malone <Cj-Malone@users.noreply.github.com> | 2016-07-25 17:27:06 +0100 |
commit | 74e6b7476d5cfd2a8f43a441e10aa7e7e87b40b9 (patch) | |
tree | 2283403e714ae5de5aec588f6da21ac2a610b09f | |
parent | 0dfa36953bc50768a5fa6a31ec8e47391e0eb6bf (diff) | |
download | AntennaPod-74e6b7476d5cfd2a8f43a441e10aa7e7e87b40b9.zip |
Amend string check
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSMedia.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSMedia.java b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSMedia.java index 46452085f..839e2ae0c 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSMedia.java +++ b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSMedia.java @@ -41,7 +41,9 @@ public class NSMedia extends Namespace { String type = attributes.getValue(MIME_TYPE); String defaultStr = attributes.getValue(DEFAULT); boolean validType; - boolean isDefault = false; + + boolean isDefault = "true".equals(defaultStr); + if (SyndTypeUtils.enclosureTypeValid(type)) { validType = true; } else { @@ -49,9 +51,6 @@ public class NSMedia extends Namespace { validType = type != null; } - if (defaultStr == "true") - isDefault = true; - if (state.getCurrentItem() != null && (state.getCurrentItem().getMedia() == null || isDefault) && url != null && validType) { |