From b01ec466f17385e98f50babde02dc1f25e38550e Mon Sep 17 00:00:00 2001 From: dwot <68145+dwot@users.noreply.github.com> Date: Sat, 4 Apr 2026 22:15:28 -0400 Subject: [PATCH 1/2] Fix for #1173 ErsatzTV EPG not populating / fix for UTF-8 BOM processing --- apps/epg/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/epg/tasks.py b/apps/epg/tasks.py index 0d05552f..a0a5f42e 100644 --- a/apps/epg/tasks.py +++ b/apps/epg/tasks.py @@ -114,7 +114,7 @@ def _open_xmltv_file(file_path: str): return f # Insert the DOCTYPE after the XML declaration if one is present. - stripped = start.lstrip() + stripped = start.lstrip(b'\xef\xbb\xbf').lstrip() if stripped.startswith(b'') if decl_end >= 0: From 29e22d1c0e9aa7dab17c141b7fca70f6ab948e0a Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Sun, 5 Apr 2026 13:52:05 -0500 Subject: [PATCH 2/2] changelog: Update for epg fix pr --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b622959..830874e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Fixed EPG sources that emit a UTF-8 BOM (e.g. ErsatzTV, EPGShare, WebGrab+Plus) parsing 0 channels and 0 programmes after the HTML entity fix introduced in v0.22.0. `bytes.lstrip()` only strips ASCII whitespace, leaving the three BOM bytes (`EF BB BF`) in place, so `stripped.startswith(b'