Provide a feeds API for managing RSS feeds
Categories
(Thunderbird :: Add-Ons: Extensions API, enhancement)
Tracking
(Not tracked)
People
(Reporter: mozilla, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15
Steps to reproduce:
I added RSS feeds, which are not THAT reliable and sometimes respond with a HTTP-404 (like "nitter.net"). These responses trigger the feed state to "Pause Updates".
As there is no way within Thunderbird to automatically re-enable that feed I want to build an AddOn which can do that.
Actual results:
There's no "feeds" API.
Expected results:
Thunderbird should provide a "feeds" API, so AddOns can be build to manage your feeds.
Well, I had a look on a possible solution vía an Experiment API to provide the needed functionality to an AddOn.
Looks like its not easily doable with an Experiment API either since the FeedUtils doesn't emit events for feed state changes.
So, there are two possible ways to get state-changes:
- permanently crawling over all feeds and checking if they are disabled (which is at most a hack/dirty quick-fix for now), or
- this solution would be isolated to that particular UseCase as you would just return plain "disabled feeds"
- and a broader status check isn't possible at all, because an Experiment API would need to track all feeds within a shadow database to know which state was changed
- changing parts of the core product (adding events to FeedUtils so you can add listeners to from your Experiment API)
- would seem like a more generic and clean approach
Any comments on that?
Is there a way to add a scheduled task within an Experiment API? I'm afraid permanently crawling would use too much CPU time.
Comment 3•3 years ago
|
||
I would definitely suggest to go for your option number 2, as I will need those events for the WebExt API as well. I could guide you in how to setup a development environment, so you could try to provide a patch for that? We could then discuss in detail, what information you need, so it will match a future API.
Updated•3 years ago
|
Hmm - you can pin-point me to a module (*.jsm, I guess) file which already has the subscribe/listener pattern implemented. Then I can have a look on how this pattern is implemented (and intended to be implemented for the FB codebase) and try to adopt it and make a patch.
Comment hidden (metoo) |
Description
•