Dispatcharr/apps
Curt LeCaptain 408c3c6bea feat(epg): add native xz decompression support for EPG sources
Adds .xz to the set of compressed formats detect_file_format(),
extract_compressed_file(), fetch_xmltv(), and EPGSource.get_cache_file()
recognize, mirroring the existing gzip handling. Uses stdlib lzma, no new
dependency. Detection works via LZMA magic bytes (fd 37 7a 58 5a 00),
the .xz extension (including compound extensions like .xml.xz), and the
application/x-xz mimetype fallback.

Widened the magic-byte read in get_cache_file() from 4 to 6 bytes since
the xz signature is 6 bytes (the previous 4-byte read was sufficient
only for the 2-byte gzip/zip signatures it originally supported). That
widening silently broke the bare-<tv> raw-XML detection: the
fixed-length slice comparison header[:5] == b'<tv>' can never match a
5-byte slice of a 6-byte header against a 4-byte literal. Replaced the
fixed-length slice comparisons with header.startswith(...), which is
correct regardless of how many bytes are read - this also fixes the
adjacent <?xml declaration check, which was silently dead before this
change (a 4-byte read could never equal the 5-byte b'<?xml' literal
either).

Fixes Dispatcharr/Dispatcharr#1414

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 19:48:44 -05:00
..
accounts tests: Move tests to under tests folder. 2026-07-07 18:51:35 +00:00
api initial connect feature 2026-02-08 09:29:22 -05:00
backups tests: Move tests to under tests folder. 2026-07-07 18:51:35 +00:00
channels test: Refactor collision avoidance tests to use a fixed timestamp and improve suffix collision checks. Introduced helper function for clearer logic in assertions regarding MKV file naming conventions. 2026-07-07 21:08:45 +00:00
connect Enhancement: Update plugin discovery logic to include release_connections parameter, improving resource management during event triggering. 2026-07-07 18:25:52 +00:00
dashboard tests: Move tests to under tests folder. 2026-07-07 18:51:35 +00:00
epg feat(epg): add native xz decompression support for EPG sources 2026-07-07 19:48:44 -05:00
hdhr fix(api): update HDHR URLs to use port-aware URI builder 2026-06-07 14:27:57 -05:00
m3u Enhancement: Update changelog to reflect changes in ChannelPagination, ensuring pagination works correctly with only page_size provided. Refactor tests to improve reliability and consistency, including adjustments to database connection management in various test cases. Modify EPG name normalization tests for accuracy and clarity, and enhance program data serializer tests to utilize precomputed season and episode values. 2026-07-07 18:30:06 +00:00
output tests: Move tests to under tests folder. 2026-07-07 18:51:35 +00:00
plugins Enhancement: Add release_connections parameter to PluginManager, allowing for conditional database connection closure during plugin discovery, improving resource management. 2026-07-07 18:27:15 +00:00
proxy tests: Move tests to under tests folder. 2026-07-07 18:51:35 +00:00
timeshift Enhancement: Update session management details and improve stream limit handling in timeshift proxy. Enhance tests for decisive account failover and session probe logic. 2026-07-06 19:49:19 -05:00
vod fix(xc): normalize server URLs for live playback and stream URLs (Fixes #1363) 2026-06-18 10:12:12 -05:00