summaryrefslogtreecommitdiffstats
path: root/db/db.go
diff options
context:
space:
mode:
Diffstat (limited to 'db/db.go')
-rw-r--r--db/db.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/db/db.go b/db/db.go
index 6bc6d04..6dfda22 100644
--- a/db/db.go
+++ b/db/db.go
@@ -68,3 +68,17 @@ func Open() (*FernDB, error) {
}
return db, nil
}
+
+func (fdb *FernDB) Exists(feed, entry string) bool {
+ if _, ok := fdb.downloaded[feed]; !ok {
+ return false
+ }
+ for _, e := range fdb.downloaded[feed] {
+ if e == entry {
+ return true
+ }
+ }
+ return false
+
+}
+