mirror of https://github.com/readrops/Readrops.git
<enclosure> tag attributes aren't required
This commit is contained in:
parent
cc8c940ee5
commit
b98b8853ec
|
@ -47,7 +47,8 @@ public final class ItemMatcher {
|
|||
} else {
|
||||
if (item.getEnclosures() != null) {
|
||||
for (RSSEnclosure enclosure : item.getEnclosures()) {
|
||||
if (enclosure.getType() != null && Utils.isTypeImage(enclosure.getType())) {
|
||||
if (enclosure.getType() != null && Utils.isTypeImage(enclosure.getType())
|
||||
&& enclosure.getUrl() != null) {
|
||||
newItem.setImageLink(enclosure.getUrl());
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@ import org.simpleframework.xml.Root;
|
|||
@Root(name = "enclosure", strict = false)
|
||||
public class RSSEnclosure {
|
||||
|
||||
@Attribute
|
||||
@Attribute(required = false)
|
||||
private String type;
|
||||
|
||||
@Attribute
|
||||
@Attribute(required = false)
|
||||
private String url;
|
||||
|
||||
public String getType() {
|
||||
|
|
Loading…
Reference in New Issue