nkanaev / yarr

yet another rss reader
MIT License
3.03k stars 225 forks source link

[BUG] There are many articles in the XML file, but only one was actually added. #215

Closed hoyii closed 13 hours ago

hoyii commented 1 month ago

Reproduction

Click the "New Feed" button, enter the RSS subscription: https://v2ex-create.nexmm.com/rss.xml, and click the Confirm button. Once added successfully, only the first article will be displayed: image

Possible Causes

I reviewed the source code, and the FeedID and GUID of this RSS subscription are both empty.So, an ID conflict occurred, which resulted in the inability to write article information into the database: image

I suspect there is an issue with the judgment here, because this XML file does not have a URL as its GUID image

Or is it a problem with the format of RSS subscriptions themselves? I'm not sure about this.

If possible, I hope you can provide some ideas for me to modify the code. Thank you!

nkanaev commented 3 weeks ago

@hoyii thanks for reporting. That's a bug. Both GUID and URL are stated as optional in the spec.

I think the best approach would be to fallback to a hash of combination of other uniquely identifiable elements (title, date and maybe content).

nkanaev commented 13 hours ago

fixed in https://github.com/nkanaev/yarr/commit/e9cbea500b08f6401b6d83747bd94210a83db68e