After having added OPDS to knewstuff, and having 'local' providers, we should think a bit on how we'll let users add opds feeds.
There's several ways to add a feed.
- Let users enter an url that points at a feed.
- Users click on a link in the webbrowser, and the browser goes like 'ok, with what exactly do you want me to open this atom feed' (as far as the webbrowser cares, it is an atom feed).
- RSS autodiscovery, users enter an url of a website, and we should scan it for <link /> tags that point at an opds feed (this is also used by RSS and Atom).
- User clicks on an url that has been marked opds://path/to/feed.opds, webbrowser goes 'ok, do we have something that can open this???'
Caveat: some opds links link to a lone entry with no way to get to the main catalog. My suggestion for this is twofold:
- We could download the feed file and check if there's a <link rel="start" /> and see if that href is already amongst our providers and then load that instead (and figure out some way of selecting the entry in question). This is more or less the same procedure as used for auto discovery, just a slightly different link type.
- We have new feeds loaded as a temp provider stuck into the temp folder and then if that all works, let users decide whether they want to add the catalog formally. It's a bit convoluted, but I think it might be a lot more user friendly than just adding the feed directly.