aboutsummaryrefslogtreecommitdiff
path: root/internal/reader/json/json.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/reader/json/json.go')
-rw-r--r--internal/reader/json/json.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/reader/json/json.go b/internal/reader/json/json.go
index 48f64c23..68f4c0f8 100644
--- a/internal/reader/json/json.go
+++ b/internal/reader/json/json.go
@@ -181,7 +181,7 @@ func (j *jsonItem) GetEnclosures() model.EnclosureList {
}
func (j *jsonItem) Transform() *model.Entry {
- entry := new(model.Entry)
+ entry := model.NewEntry()
entry.URL = j.URL
entry.Date = j.GetDate()
entry.Author = j.GetAuthor()
@@ -189,7 +189,10 @@ func (j *jsonItem) Transform() *model.Entry {
entry.Content = j.GetContent()
entry.Title = strings.TrimSpace(j.GetTitle())
entry.Enclosures = j.GetEnclosures()
- entry.Tags = j.Tags
+ if len(j.Tags) > 0 {
+ entry.Tags = j.Tags
+ }
+
return entry
}