Channels apart from providers
Design agreed 2026-09-27, and built. Where building it settled something the design left open, it's noted under Settled while building.
An IPTV channel today belongs to one login: StreamChannel(source: .xtream(streamID:, provider:)),
with its id derived from that pair and other logins' copies hanging off it in
IPTVBackups. When a login goes away (activelion, 2026-09-26) its channels still
play from a backup, but their guide, catch-up, Audit status and label all go dark
with it, and the channel's number shifts whenever anything before it is hidden or
removed.
This makes a channel a thing of its own — CNN on 42 — with an ordered list of equal feeds from any of your logins, and gives every channel a stored number.
Phase 1: stored channel numbers #
Stands alone; do it first.
- Numbers are stored, fixed, and may have gaps, like real TV. One map, channel
id → number, for the whole dial.
channelOrdergoes away; the dial is sorted by number. Moving a channel is setting its number; a taken number swaps. - Migration writes each channel's current position as its number, so the dial looks the same on day one.
- Every channel gets a number the first time it's seen — built-ins, Pluto, Plex Live, the Tubi/Xumo catalog, Plex libraries — and keeps it for good.
- A source that's unreachable (Plex server down, Pluto not answering, a login failing): its channels stay on the dial at their numbers and say so — "Plex server is down" — not a generic NO SIGNAL.
- A channel the service has removed (service working, channel gone):
- one you added (IPTV, saved Tubi…) stays on the dial, saying so, and is flagged in the Audit until you remove it;
- an automatic one (Pluto, Plex Live) leaves the dial but its number stays reserved; it returns to it if it comes back. The Audit lists it — "gone, holding 57" — with Release.
- Two devices numbering at once: the number map is merged per channel in
SettingsSync(likeflakySpells), not replaced. The same channel numbered twice keeps the lower number; two channels on one number, the one numbered first keeps it and the other takes the next free number. Every device settles on the same dial. - Hiding a channel leaves a gap; nothing shifts.
Phase 2: feeds #
The model #
- An IPTV channel holds an ordered list of feeds, each (provider, streamID),
plus tags read off the provider's name: region ("US") and quality ("HD",
"4K", "RAW").
ChannelName.tidyalready finds these and throws them away; it keeps them now. - Xtream feeds only for now, but the feed type leaves room for M3U, Pluto, Tubi or Plex feeds later.
- Ids don't change. A migrated channel keeps
xtream-<provider>-<streamID>as an opaque label: renames, hidden, buffers, flaky history and guide caches are all keyed by it. New channels take their id from their first feed, the same way. - Migration: the channel's own feed becomes #1, its
IPTVBackupsfeeds #2….IPTVBackups.channelsis retired (itseventsstay until phase 3).
Playing #
- Feeds in your order, skipping any whose login is full or down — today's
IPTVLoad.ordered, for every channel. - The Select-button status names the provider actually playing ("via Strong").
Guide #
- The first feed, in your order, whose provider has a guide for it; then the epg.pw fallback. The guide doesn't change with which feed is playing, so the Guide grid and the now/next banner agree.
ExternalGuidesstays keyed per feed, soGuideFindercan find epg.pw guides for any feed, not just the first.
Earlier Shows #
- Listed from the first feed with an archive.
- Playing a show tries the same time window on each archived feed in order, skipping full logins (a timeshift URL is only stream + start + duration).
- Manager setting, per channel: pin which feed's archive to use (e.g. trex's longer one for CNN).
Finding feeds (IPTVLinker) #
- Still automatic: guide id, else name — now also requiring the region tag to agree, so "CNN" doesn't pair with "CNN International".
- Only ever appends. A new login, or Find Again, adds feeds after the existing ones — to every channel, including ones you've edited. Several new feeds for one channel go in by quality, HD before SD.
- Never undoes you. Your order stands; a feed you removed is remembered by provider and never comes back. (Replaces the per-channel "chosen" flag.)
Adding and merging #
- Adding a channel from the Manager's IPTV search that's already on the dial offers "Add as feed to CNN (42)?" — the default — or a new channel.
- Merge into… on a channel folds it into another: the channel merged into keeps its number, name, id and settings and takes the other's feeds at the end; the other is deleted and its number freed.
Removing a login #
- Its feeds are dropped from every channel; the next feed becomes #1.
- A channel left with no feeds stays on the dial showing it has none, flagged in the Audit, for you to relink or remove.
- The sign-out warning reads "N channels lose a feed, M are left with none".
Flaky signals #
FlakySpellsrecords which feed was playing. The Select-menu warning names the provider ("Strong's feed has been flaky tonight"); the Audit groups spells by provider.
Manager #
- Each IPTV channel shows its feeds: drag to reorder, add, remove.
- The Audit calls a channel dead only when all its feeds are.
- Source label: "IPTV · Strong + trex".
What stays per channel #
Renames, buffer (ChannelBuffer), hidden.
Rollout #
- The new lineup (channels with feeds, the number map) goes under new iCloud keys. All devices get the new build together.
- The old keys (
savedChannels,channelOrder,iptvBackups) are left as they were — a free backup if migration goes wrong — and removed in a later cleanup.
Phase 3: event channels #
The same pattern: an event channel's ordered list of (provider, categoryID) peers,
replacing IPTVBackups.events, with its games matched across them as
IPTVBackups.feeds(for:on:) does now.
Settled while building #
- Settings channels (On Demand, TV Guide, Radio, Screensavers, Bars) have no stored number: they always follow the highest number, keeping them at the end of the dial. They can't be moved to a number, and no channel can be moved onto one.
- Numbering starts once the whole lineup has loaded (your Plex servers included), so the dial is written down exactly as it was. Until then a device numbers 1…n as before.
- Off the air lasts a week. A service that hasn't answered for 7 days has its
channels leave the dial (numbers held) instead of staying on it saying so. What
each service gave last is kept on each device (
KnownChannels). - The number map merge: a later choice (a move, a release) wins; two first
numberings keep the lower number; releases are remembered 30 days so they reach
every device. See
DialNumbers, with tests. - "Gone, holding" is per device. A channel only one device has (a Plex server the Mac can't reach, a playlist added on the Mac app alone) shows as gone on the others. Release it only if it's truly gone.
- The Mac app's own search adds an IPTV channel as a new channel; the offer to add it as a feed of a channel you have is in the Manager (the Live TV pane). Search does leave out streams that are already a feed of a channel.
- Add All in the Live TV pane skips channels you already have from another login, for adding as a feed one at a time.
- Find Again on a channel also brings back the logins you took off it.
- Removing a login can also remove the channels it leaves with no feeds, from the same confirmation.
Later, maybe #
- M3U feeds. No connection count to check (treat as always free, or try last),
usually no catch-up, guide from the playlist's
url-tvg. - Feed ordering by quality. Flaky or slow feeds sink on their own. The per-feed flaky spells above are the data for it.
- Per-channel guide pin, like the Earlier Shows pin.
- Collections: rule-based groups across providers ("all news") in the Guide or the Select menu.
- Logos: Xtream lists carry a
stream_iconalready, if the look wants them. - TMDB posters, synopses and cast for On Demand.
- AI naming for the names
ChannelName.tidy's rules miss.
Phin Tech docs
Rabbit Ears Manager in the store →