mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
move author to content
This commit is contained in:
@@ -5,7 +5,6 @@ import java.text.DateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang.SystemUtils;
|
||||
import org.jdom.Element;
|
||||
@@ -89,16 +88,15 @@ public class FeedParser {
|
||||
continue;
|
||||
}
|
||||
entry.setGuid(FeedUtils.truncate(guid, 2048));
|
||||
entry.setGuidHash(DigestUtils.sha1Hex(guid));
|
||||
entry.setUrl(FeedUtils.truncate(
|
||||
FeedUtils.toAbsoluteUrl(item.getLink(), feed.getLink()),
|
||||
2048));
|
||||
entry.setUpdated(validateDate(getEntryUpdateDate(item), true));
|
||||
entry.setAuthor(item.getAuthor());
|
||||
|
||||
FeedEntryContent content = new FeedEntryContent();
|
||||
content.setContent(getContent(item));
|
||||
content.setTitle(getTitle(item));
|
||||
content.setAuthor(item.getAuthor());
|
||||
SyndEnclosure enclosure = (SyndEnclosure) Iterables.getFirst(
|
||||
item.getEnclosures(), null);
|
||||
if (enclosure != null) {
|
||||
|
||||
@@ -43,9 +43,6 @@ public class FeedEntry extends AbstractModel {
|
||||
@Column(length = 2048)
|
||||
private String url;
|
||||
|
||||
@Column(name = "author", length = 128)
|
||||
private String author;
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date inserted;
|
||||
|
||||
@@ -117,14 +114,6 @@ public class FeedEntry extends AbstractModel {
|
||||
this.guidHash = guidHash;
|
||||
}
|
||||
|
||||
public String getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
public void setAuthor(String author) {
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public Feed getFeed() {
|
||||
return feed;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Entry implements Serializable {
|
||||
entry.setContent(FeedUtils.proxyImages(feedEntry.getContent()
|
||||
.getContent(), publicUrl, proxyImages));
|
||||
entry.setRtl(FeedUtils.isRTL(feedEntry));
|
||||
entry.setAuthor(feedEntry.getAuthor());
|
||||
entry.setAuthor(feedEntry.getContent().getAuthor());
|
||||
entry.setEnclosureUrl(feedEntry.getContent().getEnclosureUrl());
|
||||
entry.setEnclosureType(feedEntry.getContent().getEnclosureType());
|
||||
entry.setDate(feedEntry.getUpdated());
|
||||
|
||||
Reference in New Issue
Block a user