Skip to content

Fix HDHomeRun channels missing from lineup and ffmpeg processes spawning on startup#97

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-hdhome-run-channels-load
Draft

Fix HDHomeRun channels missing from lineup and ffmpeg processes spawning on startup#97
Copilot wants to merge 2 commits intomainfrom
copilot/fix-hdhome-run-channels-load

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 22, 2026

HDHomeRun channels were being filtered out of /lineup.json and /lineup.m3u unless explicitly added to the channel map. Separately, the startup health check was opening live stream connections to every HDHomeRun channel URL, causing the tuner device to start transcoding (ffmpeg) for each channel concurrently.

Changes

HDHomeRun channels always included in lineup (server/lineup.js)

isChannelMapped() gated all channels behind channel-map.yaml. HDHomeRun channels come from the tuner's own curated lineup and need no explicit mapping entry.

function isChannelMapped(channel, map, mapKeys) {
  // HDHomeRun channels come from a hardware tuner and are always included
  if (channel?.hdhomerun) return true;
  // ... existing map lookup
}

Health check uses device discovery, not stream probing (scripts/check-channel-health.js)

The health check was issuing a GET to each channel's stream URL (e.g. http://192.168.1.100:5004/auto/v5.1), which triggers the HDHomeRun device to start video transcoding for every channel on every check. HDHomeRun channels are now checked with a single GET /discover.json per device — all channels on a responsive device are marked online, no streams opened.

  • Regular M3U channels continue to use the existing HEAD → GET stream probe.
  • One device check covers all channels on that tuner regardless of channel count.

Tests

  • test/integration/lineup.test.js — two new cases confirm HDHomeRun channels appear in both /lineup.json and /lineup.m3u without include_unmapped.
  • test/unit/check-channel-health.test.js — three new cases verify device-level discovery is used (not stream URLs), offline device marks channels offline, and mixed HDHomeRun + M3U channel sets are handled correctly.

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Fix HDHomeRun channels loading issue Fix HDHomeRun channels missing from lineup and ffmpeg processes spawning on startup Mar 22, 2026
Copilot AI requested a review from cbulock March 22, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants