Currently, the UpsertItem function matches existing items by feed url and title:
stmt, err := db.Prepare(`select count(id), id from items where feedurl = ? and title = ?;`)
But in an RSS feed, there is (or should be) a <guid> attribute that uniquely identifies the post. This is often, but not always, the same as the <link> attribute. It looks like we should be collecting and storing the <guid> value, and using that to identify duplicate entries.
Failing that, using the link value rather than title would probably be a good idea, because it's not uncommon for article titles to change after publishing; this would allow us to gracefully handle such changes without creating otherwise duplicate entries.
What do you think?