plugin.video.iptv.recorder icon indicating copy to clipboard operation
plugin.video.iptv.recorder copied to clipboard

Improve encoding detection of the XML TV file

Open thombet opened this issue 5 years ago • 0 comments

The encoding of the XML TV file can be found either:

  1. with a regular expression on the encoding tag in the XML file
  2. or using the chardet.detect() function on the content of the XML file

Option 1 is improved by updating the regex: an encoding tag using single quotes will also be detected now.

Option 2 could last more than several minutes for huge files. So if the file has more than 50,000 characters, the detection is done only on the first 50,000 characters (which should be enough to detect the encoding).

thombet avatar Apr 28 '20 14:04 thombet