Repository navigation
Releases: combor/telesfor
Releases · combor/telesfor
Release list
v0.3.4
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.
v0.3.3
Add WP Pilot, with Polsat, TV 4, Telewizja WP and more WP Pilot streams some thirty channels free to an account. telesfor now offers them from a tuner of their own at /wppilot, numbered from 6001: the channels WP lists as free for the account, without its radio stations, which have no picture, and without the four that TVP's own tuner has. A channel's number is WP's number for it, so it keeps it when others come and go. The sign-in is the one WP Pilot's apps for TV sets use: telesfor asks WP for a code and shows it with the page to enter it on, the user signs in there, and telesfor, which has been asking meanwhile, is handed the session, in the two cookies WP's own site keeps it in. They go to WP's API alone, and are taken up as its answers reissue them. A call that WP refuses with cookies another answer has reissued meanwhile is made again; one it refuses with the session as it is puts the sign-in to expired on the settings page. WP plays a free account nothing until it has accepted WP's consents, which the settings page says for as long as that lasts. The guide looks after the account too: its consents, and the channels it gets. To WP a stream is a session of the account, of which it allows three at once, which it wants told every twenty seconds that it is watched, and which holds its place for minutes unless it is closed. A channel has one session for all who watch it, opened for the first and closed after the last: WP stops every stream of a channel once the newest of the channel's sessions is closed, so with a session each, a viewer who came later and left sooner would take the channel from the rest. An open that WP refuses for the account's limit while telesfor is closing a session is asked again once that is done, as a change of channel needs. The tuner tells Plex of three tuners, for which a device can now say how many it has. WP plays a free account's channels in a browser only, and its stream servers answer a stream's playlists only to who opened the stream, so every request names the same browser. What WP refuses is told apart: a sign-in, the consents, an address outside Poland, an address it takes for a VPN's, the limit of streams. WP's list does not say which channels are DRM-protected, and WP names licence servers for some that it streams in the clear, so the playlists tell: a channel that is protected, or has no HLS stream, leaves the lineup when it is first tuned, until the account signs out. The guide is WP's own, which reaches about half a day. The rest of the two days has the channel's name on every hour, and so has a channel WP has no guide of. - internal/provider/wppilot: the provider, its sign-in, its guide, their tests and a live test. - internal/tuner: a device's number of tuners. - cmd/telesfor/main.go: WP Pilot's tuner and -wppilot-proxy. - README.md, docs/usage.md, docs/development.md, packaging/linux/telesfor.env: WP Pilot, its sign-in, its channels, its guide and its proxy.
v0.3.2
v0.3.1
Serve the guide from a cache fetched ahead of Plex asking
v0.3.0
Add TF1+, with TF1, TFX, TF1 Séries Films and LCI TF1 streams its channels on TF1+. telesfor now offers TF1, TFX and TF1 Séries Films, which are free with a TF1+ account, and LCI, which needs none, from a tuner of their own at /tf1, numbered from 5001. TMC is left out: TF1+ streams it DRM-protected. Since v0.2.7, a stream that comes in more than one quality is also played in the best one the connection keeps up with, and segments are fetched over HTTP/1.1 so an abandoned fetch holds up no other.
v0.2.7
Add France Télévisions, with France 2 and four more channels France Télévisions, the French public broadcaster, streams its channels on france.tv. telesfor now offers France 2, France 3, France 4, France 5 and franceinfo from a tuner of their own at /francetv, numbered from 4001. None of it takes an account. The guide is the one france.tv's own is made of, a day of a channel at a time. It has what a channel shows and when, but calls a programme by its episode alone, such as "Émission du mercredi 7 octobre 2026". The name of the programme comes from the API of France Télévisions' apps, which keeps a programme at a path that the guide does not give. So the provider asks what is at every path the programme may be at, under the address of its episodes' pages or under its own name, until the answer has the id the guide has for it, and remembers the answer. A guide asked for while another's programmes are looked up waits for them. A programme found nowhere goes by the name the guide has for its statistics, as "Dans le retro". The episode's name is the first line of the description, and a programme's poster is its upright one. The guide's starts and lengths do not add up: lengths are those of recordings or of slots, and what comes between programmes is not listed. A programme ends where the next one starts, unless that is more than twenty minutes after its own end, and a programme listed twice a minute or two apart is kept once. Where nothing is listed, the guide has the channel's name, an hour at a time. Tuning asks the apps' API for the channel's live video, the player's API where its stream is, and for a pass to it, which stands in the path of every address of the stream. It then looks at the stream's best quality and at its newest segment: the playlists are handed out anywhere, the picture and the sound only in France, all but franceinfo's. A channel that is blocked abroad, refused, unavailable or DRM-protected is told apart, and -francetv-proxy takes a proxy with a French exit. ffmpeg reads the stream through a transport of the provider's: - It is handed the best quality and the French sound only. Given the whole master playlist, it would read the start of six qualities, three sounds and the subtitles, each with a playlist of four hours. - Playlists are asked for whole rather than by range, so that they come compressed: 640 kB of playlist is 14 kB on the wire, every few seconds. - France 4's and franceinfo's playlists name their key by its full address, which ffmpeg would ask for itself, past the relay and the proxy, and be refused. It is named by its path instead. - A pass lasts six hours. A request that is refused is sent again with a new one, which the requests after it go with. The daily check of the providers' real sites now checks France Télévisions' as well. - internal/provider/francetv: the provider, its tests and a live test. - cmd/telesfor/main.go: france.tv's tuner and -francetv-proxy. - .github/workflows/live.yml: the daily check, for france.tv too. - README.md, docs/usage.md, docs/development.md, packaging/linux/telesfor.env: france.tv, its guide, its proxy and its live delay.
v0.2.6
Play a stream TVP's CDN refuses from one of TVP's own servers TVP hands a stream out at one of its own servers or at a router that sends on to a CDN, the same one for half a minute at a time. The router answers the addresses of VPN providers with 403. So behind a VPN a tune worked or failed by which of the two TVP named just then. What makes a stream out, its path with the token in it, is good at either host. A stream that is refused where it was handed out is now asked for at the host that last served one. A tune with no such host to go to asks TVP again, for fifteen seconds, until it names one of its servers. So that a host is known before anyone tunes, the provider asks for a stream in the background once it has listed its channels: every ten seconds, for up to five minutes, until a host serves it. If none does, the log says that TVP's CDN refuses this address and TVP names no server of its own. That is how it is behind most Polish servers of the VPN this was tried with: TVP's own servers do not answer their addresses either, and nothing in telesfor gets past that. Another server of the VPN does. A viewer who leaves while a refused stream is asked for at the host does not make the provider forget it, and a host that serves no more does not take with it one that another tune has found meanwhile. - internal/provider/tvp: the host that serves, learnt from tunes and at startup, and its tests. - docs/usage.md: that not every VPN server in Poland will do.
v0.2.5
Add EBC, with TV Brasil and three more channels EBC, Brazil's public broadcaster, streams its television channels on the web without an account. telesfor now offers four of them from a tuner of their own at /ebc, numbered from 2001: TV Brasil, TV Brasil Internacional, Canal Gov and Canal Educação. Canal Libras is left out: the stream its page names answers 404. Only TV Brasil has a guide, on its site, a day to a page. A page gives a programme's start and, mostly, its name, so a programme runs until the next one starts, which for the last of a day is the first of the next. The times are Brasília's: the site does not say so, but its mark of what is on now agrees. Where EBC lists no programme, or leaves one unnamed, the guide has the channel's name in its place, an hour at a time, so that Plex has something to offer on the three channels without a guide. The streams are at addresses that stay the same. Tuning looks at a channel's playlists first, and tells apart a channel that is unavailable, one that asks for a sign-in, one that EBC refuses outside Brazil and one that is DRM-protected. The streams play abroad today, but EBC keeps some of its pages to Brazil, so -ebc-proxy is there should it do the same to them. ffmpeg is handed the best quality of a channel only. Given them all, it reads the start of each before it settles on the best, and EBC's CDN takes seconds over a segment that nobody nearby has asked for yet: a channel took up to fifteen seconds to start, and now takes one to seven. The daily check of TVP's real API now checks EBC's site and streams as well. - internal/provider/ebc: the provider, its tests and a live test. - cmd/telesfor/main.go: EBC's tuner and -ebc-proxy. - .github/workflows/live.yml: the daily check, for both providers. - README.md, docs/usage.md, docs/development.md, packaging/linux/telesfor.env: EBC, its guide and its proxy.
v0.2.4
Give each provider a tab of its own on the settings page The settings page was one page that knew every provider's parts by hand. A provider was spread over it: its addresses in one card, its sign-in in a section, its proxy among the server's settings and its channels at the bottom. A new provider, or a new kind of setting, meant changing the shared page. The page now has a tab for each provider and one for the server. A provider's tab holds what to enter in Plex for it, its sign-in if it has one, the settings it was started with and its channels. The server's tab holds the version, the listen address, the data directory and debug logging. The page opens on the first provider. A tab shows how many channels its provider has. The number is green while one of them is on air, and amber when the provider's sign-in has expired, so that shows from every tab. A provider can now bring settings the page knows nothing about. One that implements provider.Settings writes its part of the tab as HTML and takes the forms posted from it. telesfor then asks for its channels again, in case the settings change them. No provider uses this yet. The sign-in by a code stays as it was, for any provider.Account. Each provider's proxy is now declared with its tuner and shown on its tab, in place of one list of settings for all. /ui/settings, where the page was, leads to the new one: a page left open since v0.2.3 still refreshes from there. - internal/provider/provider.go: what a provider with settings of its own offers. - internal/web: the tabs, a template for a provider's tab and one for the server's, and the route a provider's forms post to. - cmd/telesfor/main.go: each provider's settings beside its tuner. - README.md, docs: the tabs, and how a provider adds to its own.
v0.2.3
Add Globoplay, with a tuner and a sign-in of its own telesfor had one provider, TVP, and one tuner for all of its channels. Globoplay is the second. It streams TV Globo, Futura and ge tv free to a Globo account, so telesfor now signs in. The settings page shows a code to enter on Globo's own site, and telesfor never sees a password. The page says where the sign-in stands: waiting for the code, signed in, a code that ran out, or a sign-in that Globo refused or no longer accepts. Each provider has a tuner of its own, with its own guide. TVP's stays at the root, with the device ID Plex knows it by, and Globoplay's is at /globo. Plex takes both as devices of one DVR and sorts their channels by number, so Globoplay's are numbered from 1001. A channel there keeps its number whichever of the others Globo lists. The sign-in is kept in a bbolt database, as magnetowid keeps its state, in a data directory: -data or TELESFOR_DATA. The packages keep it in /var/lib/telesfor and the container in /data. bbolt is telesfor's first dependency. Globo blocks its channels outside Brazil. -globo-proxy sends the sign-in, the guide and the streams through a proxy with a Brazilian exit. TV Globo and its guide are the regional station's of that exit. Every quality of a Globo stream has the sound in it, and ffmpeg, given them all, downloads two. telesfor hands it the best one. Playing these channels does not tell whether Globo still accepts the sign-in, so telesfor asks when Plex fetches the guide. The settings page changes something now, so it refuses requests that come from another site. It still asks for no sign-in to telesfor. - internal/provider/globo: the provider and its sign-in. - internal/store: the database. - internal/provider/provider.go: what a provider with accounts offers, a channel's place, and the proxy client of both providers. - internal/tuner: a tuner for one provider, at a path, scanned again when an account's channels change. - internal/web: the providers on the settings page, and the sign-in. - cmd/telesfor/main.go: the store, both tuners and the new settings. - Dockerfile, packaging/linux, .github/workflows/ci.yml: the data directory and the dependency. - README.md, docs: Globoplay, the data directory and both tuners in Plex.