Jellyfin-Migrator
Jellyfin-Migrator copied to clipboard
[Minor BUG]: XML encoding headers are stripped from XML files
Most of the XML files start with encoding details like:
<?xml version="1.0" encoding="utf-8"?>
<XbmcMetadataOptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
But after they've been processed, the encoding is removed, leaving just (in the example given):
<XbmcMetadataOptions>
This seems to affect virtually every XMl file. I suspect the python XML parser is transparently reading these explicit encoding details, then not writing them back out to the post-processed file.
I don't know if there's a way to conditionally add these details to the post-processed file only if the input file had them, but it also wouldn't hurt if they were just always added to the output files (I don't think a case exists where it would hurt to add encoding details that weren't already there). Only the Schema stuff might be worth extracting explicitly from the input file since it might change in the future.