One kind of IPTV channel
Design agreed 2026-09-27; built the same day. Where building it settled something the design left open, it's noted under Settled while building. It follows channel-feeds.md and sport-channels.md.
Today there are two kinds of IPTV channel. A feed channel (FeedChannel,
BBC 1 on 43) is a list of streams tried in order. A sport channel
(EventChannel, NFL) gathers games from event folders, plus always-on channels
(AlwaysOn, Sky Sports F1) that play when their guide shows the sport live.
They're edited, played, guided and found on your logins by separate code.
The two are already close: an always-on channel is a stream with feeds on several logins and an optional guide, which is all BBC 1 is. This makes them one thing: a channel is an ordered list of entries.
Phase 0: several feeds from one login #
Built 2026-09-27, ahead of the rest. A feed channel can hold several streams
from the same login (BBC One HD and BBC One Scotland on Trex). Adding a feed
skips only a stream it already has. Taking one off leaves its login's other
feeds, and the login stays off for finding feeds again only when it was the
last. set_feeds takes feed ids (login:stream_id) or whole logins.
The model #
An IPTV channel has:
- Entries, in the order you set. Each is one of:
- a stream: a name ("BBC 1", "Sky Sports F1"), its feeds on your logins in
fallback order (as
FeedChannel.feedsnow, several per login allowed), an optional guide, and when it plays: always, or only when its guide shows the channel's sport live (asAlwaysOnnow). - an event folder on one login (as
EventSourcenow): it plays whatever game is on in it.
- a stream: a name ("BBC 1", "Sky Sports F1"), its feeds on your logins in
fallback order (as
- Sport rules, optional: the sport ("nfl"), a team filter ("Mets, Yankees") and a time zone. They decide which folder slots are games, as now.
- A preferred login, optional (see Playing).
- Kept per channel as now: its id, number, rename, buffer, flaky history, and where Earlier Shows come from.
So BBC 1 is one stream entry that always plays. NFL is its folders, with maybe an always-on stream. Nothing stops a channel from having both.
A game carried in several folders is still one game with several feeds (see
Games.channel). It takes the place of its highest folder in the entry order.
Playing #
- What's on now is every entry that's on: a stream set to always, a stream whose guide shows the sport live, and each folder's live games.
- The first one in your order plays. Up/down steps through the others on now, as sport channels do today. With one thing on, up/down changes channel. Between games, a channel with nothing on shows what's coming up.
- Feeds within an entry go as today: those whose login has room first
(
IPTVLoad.ordered), then the same stream on its login's other servers. - Preferred login: every entry on the channel, whether a stream, a game or an always-on channel, tries that login's feeds first, still skipping it when it's full or down. It's new for games, whose feeds today just follow folder order.
The Select menu #
- Every entry has the Feed page: streams, games and always-on channels alike.
- A pick plays until you change channel. Under the feeds, "Prefer Trex on this channel" sets the channel's preferred login. A bad stream tonight doesn't quietly change the channel for good.
- The feed channel's "keep this feed first" goes; the preference replaces it.
Guide #
- The row shows what would actually play, slot by slot, by the same rule: the first entry on then. A game at 8pm shows the game, Sky Sports F1's race shows the race, and in between it shows the always-on stream's own listings, or "Next: …".
- BBC 1's row is its listings, as now. The grid, the now/next banner and the picture agree.
- A stream's guide is found as a feed channel's is now: the first feed whose
login has one, then epg.pw, then epgshare01 (
SportGuides) for always-on ones.
Manager #
- One editor for every IPTV channel: its entries (drag to reorder, add a stream or folder, take one off), each stream's feeds within it (as the Feeds sheet now), the sport rules, the preferred login, Earlier Shows, and Merge.
- Finding copies (
IPTVLinker) adds feeds to stream entries by guide id or name, as now, for every channel's streams, always-on ones included. Folders are still found by the sport rescan. - The Audit checks every entry: streams as feed channels now, folders as sport channels now. A channel is dead only when nothing on it plays.
- Source label: "IPTV · Strong + Trex", with sport channels saying their sport.
- Logins drop in and out. Feeds and folders point at a login's id and a
stream number or category, never at a server, so a login's servers, username
and password change in place (Details → Edit Login…,
LoginSwap) and every channel follows. Saving asks the new login for its list: a stream number it lists as something else, or doesn't list, is found again by guide id or name (Twins), folders by category name, and their epg.pw guides move with them. What it can't find is shown before saving and left as it is. A new login is linked to your channels (IPTVLinker) as soon as it's added; removing one leaves the channels that have other logins playing from those. - Audit… in the IPTV pane (
ProvidersAudit) lists, for each login, the channels with something only it plays: the whole channel (goes dark without it), or some of its streams or folders. Each has its feeds editor a click away, each login its Edit Login, and Find Backups runsIPTVLinker. - Signing in is one form: paste playlist links or a provider's whole
welcome email, and Find Servers (
ProviderMessage) fills the servers, a line each, and the username and password when it gives them; addresses under a line saying they need a VPN go last. Real emails are its test fixtures, logins swapped for test-user and test-pass. The paste boxes are fixed-height editors (PasteBox): a text field growing with a long paste beachballed. - VPN servers (
XtreamLogin.needVPN): Connect, Edit Login's Save and Details' Check Servers try every server at once (LoginSwap.ranked). Those that answer go first, fastest first; those that turn the login away from here (a 403, as VPN-only servers do), or that the email listed for a VPN, are tagged VPN and kept last as backups. Remove Not Working leaves them.
MCP tools #
get_channellists entries, each with its feeds (and feed ids) or folder.set_feedsworks on one stream entry; a newset_entriesorders and removes entries; a newset_preferred_login.add_feedadds to a stream entry, andadd_always_onbecomes adding a stream entry to any channel.add_sport_channel,get_sportand the review tools stay.
Rollout #
- Ids don't change:
xtream-…,sport-nfl,events-…. Numbers, renames, buffers, flaky history and guide caches are keyed by them. - The new lineup goes under a new iCloud key. Feed channels move out of
addedChannelsand sport channels out ofeventLineup. Those keys are left as they were, a free backup, and removed in a later cleanup. - Migration: a feed channel becomes one stream entry (its name, feeds, archive and removed logins). A sport channel keeps its folders in order, then its always-on channels as stream entries set to play when the sport is live. Its folders go before its always-on streams, so it plays as it does today.
- All devices get the new build together, as with feeds.
Settled while building #
- One type,
IPTVChannel, onChannel.kindas.xtream, saved underiptvLineup. Itssourcesandstreamsread and write its folders and streams in place, so the sport code works on it unchanged.AlwaysOnis nowIPTVStream, withplayssaying when it's on. The search result that used that name isIPTVListing. - A channel of one stream (
single) looks as feed channels did: the provider guide's now/next banner, its name tidied, Earlier Shows from that stream. With more than one entry, or a sport's live showing, the sport banner shows instead. - Earlier Shows come from the stream on now, from its own pinned login.
- Adding a feed with no stream named goes to the stream of the same name,
else the first.
add_feedcan make it a stream of its own instead. - Merging puts the other channel's folders after this one's. Two channels of one stream each merge their feeds into one stream; otherwise the other's streams come as streams of their own.
- Game sorts are kept while a channel's folders and sport rules stay the
same (
sortsLike). Changing a stream's feeds or the preferred login doesn't make the Apple TV sort again. - The Guide overlay is
Timeline.overlayin RetroLineup, with tests. A stream with no listings fills its gaps with its name. - "Prefer Trex on This Channel" in the Select menu replaces "Always Use This Feed", on every stream and game.
- The Feeds sheet is the one editor. Folders are still added from Sports and the Live TV pane, and the sport rules are still set in Sports.
Build order #
- The model, migration and storage, with tests for the migration.
- Playing: one channel view for both, preferred login, the Select menu.
- The Guide row.
- The Manager editor,
IPTVLinkerand the Audit. - The MCP tools and docs/mcp.md.
Phin Tech docs
Rabbit Ears Manager in the store →