Beta Metadata Editor - Update library + .nfo informations
@acevideo
You're looking in the right place, and in your case, the line is correct. So if the .nfo files it creates are proper for you, then there's nothing to fix. If the XML declaration line is missing, and you need it, then you could update the code to:

Code:
        if PYTHON3:
            content = ET.tostring(self.root).decode()
        else:
            content = ET.tostring(self.root, encoding='UTF-8', method='xml')
            if not content.startswith(r'<?xml'):
                  content = '<?xml version="1.0" encoding="UTF-8" ?>\n' + content
* Note the above code should only be used for Kodi Leia 18.x using python 2.x

@all
My original post will only work for Kodi Nexus 20.x but the following code will work for both Kodi Matrix 19.x and Nexus. Substitute the 1 line for these 3:

Code:
       content = ET.tostring(self.root, encoding='UTF-8', method='xml').decode()
       if not content.startswith(r'<?xml'):
            content = '<?xml version="1.0" encoding="UTF-8" ?>\n' + content

Regards,
at2010
Reply


Messages In This Thread
RE: Metadata Editor - Update library + .nfo informations - by At2010 - 2023-11-15, 02:24
Metadata editor error - by BartZorn - 2023-02-23, 10:02
Logout Mark Read Team Forum Stats Members Help
Metadata Editor - Update library + .nfo informations0