Skip to content

v0.3.4

Latest

Choose a tag to compare

@github-actions github-actions released this 09 Oct 13:59
· 8 commits to main since this release
Let a provider be disabled, on its tab and through an API

Every provider had a tuner, wanted or not: telesfor asked each for
its guide through the day, and did not start unless TVP listed its
channels. A provider can now be disabled. Its tuner then answers
404 to everything, so it is not there for Plex, the streams it
plays end, and telesfor asks the provider for neither channels nor
a guide. The choice is kept in the store, so it outlasts restarts,
and a tuner disabled there is not scanned at startup. Every
provider starts out enabled, as before.

Enabling asks the provider for its channels, as starting does. If
it cannot list them, the tuner stays disabled, and the tab or the
API says so.

A provider's tab has the switch, in a section of its own above the
channels. The tab of a disabled provider has the switch alone, and
is dimmed among the tabs. The page opens on the first provider
that is enabled.

The API is GET /api/providers, which lists the providers and
whether each is enabled, and PATCH /api/providers/{id} with
{"enabled": false} or true. Like the page it asks for no sign-in,
and refuses requests from pages of other sites.

The health check asked TVP's tuner, which may now be disabled. It
asks the API instead.

What a provider does in the background on its own is left to run
out: TVP's search for a host that serves streams, for up to five
minutes, and a sign-in that waits for its code.

- internal/tuner: Enable, Disable and Enabled, the time enabled
  that requests, streams and guide fetches end with, and the
  store, which New now takes.
- internal/web: the switch on a provider's tab, the dimmed tab,
  and the API.
- cmd/telesfor: the store for each tuner, and the health check's
  address.
- docs/usage.md, docs/development.md: disabling, the API, and
  what the data directory keeps.