aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/cache_v1.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/feed/cache_v1.go')
-rw-r--r--internal/feed/cache_v1.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/feed/cache_v1.go b/internal/feed/cache_v1.go
index 45182dc..0e43eab 100644
--- a/internal/feed/cache_v1.go
+++ b/internal/feed/cache_v1.go
@@ -171,7 +171,7 @@ func (cf *cachedFeed) deleteItem(index int) {
cf.Items = cf.Items[:len(cf.Items)-1]
}
-func (cf *cachedFeed) filterItems(items []feeditem, ignoreHash bool) []feeditem {
+func (cf *cachedFeed) filterItems(items []feeditem, ignoreHash, alwaysNew bool) []feeditem {
if len(items) == 0 {
return items
}
@@ -200,7 +200,7 @@ CACHE_ITEMS:
if cf.LastCheck.IsZero() || ci.PublishedDate.After(cf.LastCheck) {
log.Debug("Newer than last check, including.")
- item.addReason("newer")
+ item.addReason("time")
app(item, ci, nil)
continue
}
@@ -233,6 +233,11 @@ CACHE_ITEMS:
}
if oldItem.Link == ci.Link {
+ if alwaysNew {
+ log.Debugf("Link matches, but `always-new`.")
+ item.addReason("always-new")
+ continue
+ }
log.Debugf("Link matches, updating: %s", oldItem)
item.addReason("link (upd)")
app(item, ci, &idx)
@@ -242,6 +247,7 @@ CACHE_ITEMS:
}
log.Debugf("No match found, inserting.")
+ item.addReason("new")
app(item, ci, nil)
}
init: allow deinitializationJason A. Donenfeld2-2/+18 2014-04-18bash-completion: filter dot files from resultsJason A. Donenfeld1-3/+8 2014-04-18reencrypt: remove option, do automaticallyJason A. Donenfeld5-39/+25 2014-04-18reencryption: add to completion filesJason A. Donenfeld3-1/+5 2014-04-18Specify variable gpg.Jason A. Donenfeld1-1/+1 2014-04-18style: don't escape new line on &&Jason A. Donenfeld1-2/+2 2014-04-18reencryption: remove temporary file on failureJason A. Donenfeld1-1/+1 2014-04-18reencryption: only reencrypt files when requiredJason A. Donenfeld2-16/+37 2014-04-17cp: typo as cvJason A. Donenfeld1-1/+1 2014-04-17bash: gpg_id is localJason A. Donenfeld1-0/+1 2014-04-17move/copy: always reencrypt passwords at destinationJason A. Donenfeld5-25/+56 2014-04-17makefile: allow platform files with gnu sedJason A. Donenfeld1-7/+8 2014-04-17mv: Add pass mv/rename supportJason A. Donenfeld5-3/+78 2014-04-17revelation2pass: add plain XML importJavali1-11/+15 2014-04-17platform: add cygwin supportJason A. Donenfeld2-1/+17