diff options
author | Frédéric Guillot <fred@miniflux.net> | 2019-01-29 20:01:36 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2019-01-29 20:01:36 -0800 |
commit | ed6ae7e0d277c53ac77b5f17327355ca76275556 (patch) | |
tree | 31dc6d7f852a883305cbb30c1230ec3e74994d5c /reader/atom/atom.go | |
parent | c71681b197f0612eed337ebd6c8e732788756e2d (diff) |
Use preferably the published date for Atom feeds
YouTube feeds use the published date for the original creation date.
Diffstat (limited to 'reader/atom/atom.go')
-rw-r--r-- | reader/atom/atom.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/reader/atom/atom.go b/reader/atom/atom.go index 28d4e15..30297e5 100644 --- a/reader/atom/atom.go +++ b/reader/atom/atom.go @@ -130,9 +130,13 @@ func getRelationURL(links []atomLink, relation string) string { } func getDate(a *atomEntry) time.Time { - dateText := a.Updated + // Note: The published date represents the original creation date for YouTube feeds. + // Example: + // <published>2019-01-26T08:02:28+00:00</published> + // <updated>2019-01-29T07:27:27+00:00</updated> + dateText := a.Published if dateText == "" { - dateText = a.Published + dateText = a.Updated } if dateText != "" { |