mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
only add enclosure if there's one
This commit is contained in:
@@ -77,10 +77,12 @@ public class Entry implements Serializable {
|
||||
content.setValue(getContent());
|
||||
entry.setContents(Arrays.<SyndContent> asList(content));
|
||||
|
||||
SyndEnclosureImpl enclosure = new SyndEnclosureImpl();
|
||||
enclosure.setType(getEnclosureType());
|
||||
enclosure.setUrl(getEnclosureUrl());
|
||||
entry.setEnclosures(Arrays.<SyndEnclosure> asList(enclosure));
|
||||
if (getEnclosureUrl() != null) {
|
||||
SyndEnclosureImpl enclosure = new SyndEnclosureImpl();
|
||||
enclosure.setType(getEnclosureType());
|
||||
enclosure.setUrl(getEnclosureUrl());
|
||||
entry.setEnclosures(Arrays.<SyndEnclosure> asList(enclosure));
|
||||
}
|
||||
|
||||
entry.setLink(getUrl());
|
||||
entry.setPublishedDate(getDate());
|
||||
|
||||
Reference in New Issue
Block a user