akrennmair / newsbeuter

Newsbeuter is an open-source RSS/Atom feed reader for text terminals.
http://www.newsbeuter.org/
MIT License
780 stars 100 forks source link

possible issue with rss having same title #193

Open insteps opened 9 years ago

insteps commented 9 years ago

eg feeds. http://news.bbc.co.uk/rss/newsonline_world_edition/asia-pacific/rss.xml "/news/bbc.co.uk" http://news.bbc.co.uk/rss/newsonline_world_edition/south_asia/rss.xml "/news/bbc.co.uk"

1. add the above feed to testurls.txt 2. newsbeuter -u testurls.txt -c testurls.sqlite -x reload 3. a. newsbeuter -u testurls.txt -c testurls.sqlite b. press 'r' on each entry, quit and redo 3a

Issue: The feeds number interchange from one feed to another.

Thanks.

insteps commented 9 years ago

Forgot to mention, "rssurl" entry is different but "url", "title" are same. Hope there is an easy solution !

Minoru commented 8 years ago

I wasn't able to reproduce this with current Newsbeuter. I used the following for my URLs file:

http://feeds.bbci.co.uk/news/world/asia/rss.xml "~BBC" "/news/bbc.co.uk"
http://feeds.bbci.co.uk/news/world/asia/china/rss.xml "~BBC" "/news/bbc.co.uk"

@insteps, can you still experience the issue with Newsbeuter built from the HEAD of the repository?

insteps commented 8 years ago

Now it does happen for first 'r' -> reload, but on subsequent try (3a above) it does not.

Minoru commented 8 years ago

Oh, I misunderstood the effect of the steps in your original report.

Different phrasing, so that I don't forget later: when there are two feeds with the same title and you manually reload one of them, it looks like another is being fetched, and then all its updates are appended to the currently selected feed. In short, items are being mixed up!

I confirm existence of the bug. Stay tuned—I'll ask you to test once I get a fix that works for me.

Minoru commented 8 years ago

Okay, so the culprit are the items with identical GUIDs that are present in both feeds. When second feed is updated, it effectively steals the items from the first one. (Subsequent updates, at least when done immediately, do nothing because Newsbeuter doesn't really fetch anything due to ETag telling it nothing has been updated. I expect the items will be stolen back once new ones will be posted to the first feed.)

I'll just rewrite everything to use rss_item.id instead.

insteps commented 8 years ago

For note, these are duplicate rss-items and iirc some rss reader treat them as single entry in the db.

Minoru commented 8 years ago

Please take a moment to read #249 and express your opinion there.

Minoru commented 8 years ago

Moving this to 2.11 milestone to unblock 2.10 release.