Open Bug 1729864 Opened 3 years ago Updated 3 years ago

Provide a feeds API for managing RSS feeds

Categories

(Thunderbird :: Add-Ons: Extensions API, enhancement)

Thunderbird 91
enhancement

Tracking

(Not tracked)

UNCONFIRMED

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.

See Also: → 1656651

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?

Flags: needinfo?(john)

Is there a way to add a scheduled task within an Experiment API? I'm afraid permanently crawling would use too much CPU time.

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.

Flags: needinfo?(john)
Summary: Thunderbird doesn't provide a "feeds" API to allow AddOns to dynamically manage feeds. → Provide a feeds API for managing RSS feeds

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.

You need to log in before you can comment on or make changes to this bug.