From c42b60a58c62e91eea33a8199b1614e883a8d065 Mon Sep 17 00:00:00 2001 From: Aetherinox Date: Tue, 8 Apr 2025 01:50:59 -0700 Subject: [PATCH] chore: add comment to new jellyfin encoding fix --- tvapp2/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tvapp2/index.js b/tvapp2/index.js index 4932bba3..6dc7cd12 100755 --- a/tvapp2/index.js +++ b/tvapp2/index.js @@ -473,6 +473,24 @@ async function prepareGzip( ) } } +/* + + @note Jellyfin Users + Originally, this node webserver enabled gzip compression for the value `Accept-Encoding`. Doing this + may cause an error to appear in Jellyfin logs / console when attempting to fetch the latest guide data + from the tvapp2 xml file. + + [ERR] [27] Jellyfin.LiveTv.Guide.GuideManager: Error getting programs for channel XXXXXXXXXXXXXXX (Source 2) + System.Xml.XmlException: '', hexadecimal value 0x1F, is an invalid character. Line 1, position 1. + + To fix the error, we create a customizable env variable that allows the user to override the encoding header. + We change the following: + 'Accept-Encoding': 'gzip, deflate, br' + to + 'Accept-Encoding': 'deflate, br' + +*/ + async function fetchRemote( url ) { return new Promise( ( resolve, reject ) =>