plugin.video.iptv.recorder
plugin.video.iptv.recorder copied to clipboard
Improve encoding detection of the XML TV file
The encoding of the XML TV file can be found either:
- with a regular expression on the encoding tag in the XML file
- 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).