mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
feat(rss): calculate hash based on item title/content for feeds without GUID and link
This commit is contained in:
parent
366928b35d
commit
191f3a7ad7
2 changed files with 38 additions and 2 deletions
|
@ -101,10 +101,13 @@ func (r *RSSAdapter) BuildFeed(baseURL string) *model.Feed {
|
|||
}
|
||||
|
||||
// Generate the entry hash.
|
||||
if item.GUID.Data != "" {
|
||||
switch {
|
||||
case item.GUID.Data != "":
|
||||
entry.Hash = crypto.Hash(item.GUID.Data)
|
||||
} else if entryURL != "" {
|
||||
case entryURL != "":
|
||||
entry.Hash = crypto.Hash(entryURL)
|
||||
default:
|
||||
entry.Hash = crypto.Hash(entry.Title + entry.Content)
|
||||
}
|
||||
|
||||
// Find CommentsURL if defined.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue