Replace hex value in AE XML file between mac and PC

There appears to be a bug in AE that lists the incorrect file type of a .mov when other codecs are install. This isn’t an issue for rendering, on the commandline or in application (for my NotchLC coded at least). There is however there’s an issue when moving files from a Mac to a PC, the HEX code is flipped in the xml.

Mac
(50434c4e = “PCLN”)

PC
(4e4c4350 = “NLCP”)

(Notch LC Premier is the name of the plugin)

the same flip is also in the tag

Where’s a good spot to add a replace command in the After effects plugin script? Are the path mappings locked to only drive paths, or can I put in text there as a “find and replace”? The <sspc bdata tag has leading zeros before the item needing chaged, so is easy to search for. If the path replace only works within tag then what’s a good starting point in the AE Plugins to do this replacement?

In the AE Plugin, the deadline.scripting import RepositoryUtils to get the CheckPathMapping function, where can I find that script in the repo? or is it compiled?

Obviously it would be great if AE fixed this, but for now and some large upcoming projects it would be great to be able to just hack this solution in and stop renders failing.

Cheers

Note, credit to the person who originally found the cause of the issue! It was a user here that discovered it: