1
0
Fork 0
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:
Frédéric Guillot 2024-10-18 17:59:18 -07:00
parent 366928b35d
commit 191f3a7ad7
2 changed files with 38 additions and 2 deletions

View file

@ -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.