1. Preferences
  2. UI elements

Preferences

Component preferences are located in Preferences Components Auto Check for Updates.

Preferences page
Preferences page

When speaking about subject of checking for updates, component uses word 'source'. That is so because not only components can be checked for updates. For example, foo_youtube also provides the way to check for updates of LAV Filters, which is optional third-party set of DirectShow filters used there for video playback.

This list has check boxes. Auto check for updates is performed only for items that are checked. Button Check for Updates also performs check only for checked sources. Every new source is unchecked by default.

Each item in the list has context menu. Content of this menu may vary except that it always contains Check for Updates item. Using this item particular source can be checked for updates regardless of whether item is checked in the list.

How often to check for updates can be configured at the bottom of preferences page. Minimum checking period is one day. Next check is performed exactly after number of days specified there and counts from last successful check. If program is not running at that time, check is performed at next program start. Scheduled check time is printed in console after program start and after every automatic check.

Why sources list differs from the list of installed components?

This is third-party component, not part of foobar2000 core. Particular source will appear in this list only if somebody made use of component SDK and provided for that source a way to check for updates.

In other words, foobar2000 gets list of installed components (the list from Preferences Components) and checks for updates of those components from this list, that are part of Components Repository.

foo_acfu checks for updates of all components listed on its preferences page, but there are no centralized repository and components should provide the way to check for updates by themselves.

GitHub personal access token

When checking for updated components hosted on GitHub, component makes use of GitHub API. Unauthorized access to this API has limits, and if they exceed, you will see next message:

component_name: API rate limit exceeded for X.X.X.X. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

where X.X.X.X is your IP address. Limits look to be big enough for regular use, but since they are IP-based, you might get in trouble accessing API from large network behind NAT. Or if you are developer and currently testing foo_acfu source for your own component. All in all, you can specify your personal access token for GitHub to overcome this limitation.

To create personal access token, go to Personal access tokens settings page and press button Generate new token. Enter something in Token description edit box and press Generate token button. That is it. Do not check any check boxes. They give various additional rights to manage your repositories, and foo_acfu does not need this. It only needs ability to read info about public repos, which is provided by every access token.

After token is generated, you can copy it and paste in Preferences Advanced Updates GitHub access token when auto checking for updates.

UI elements

Component provides UI elements for both DUI and CUI. Considerations used when creating UI element: be small and simple; attract attention only when updates are available; be accessible from keyboard.

With that said, UI element was made of toolbar with a single button. This button is transparent while there are no updates. If updates are available, it uses highlight color from current theme to get attention and to report the number of available updates. It is always accessible from keyboard and shows component preferences page when clicked.

Example of how it may look in UI:

No updates are available
No updates are available
Updates are available
One update is available