Try this.
Code:
<custommix>
<hacks>
<![CDATA[
if "swapchannels" in providers[section_identifier] and len(providers[section_identifier]["swapchannels"]) > 0 and "preferred_order" in providers[section_identifier]["swapchannels"][0]:
for swaprule in providers[section_identifier]["swapchannels"][0]["preferred_order"]:
if swaprule[0] in services[section_identifier]["video"] and swaprule[1] in services[section_identifier]["video"] and services[section_identifier]["video"][swaprule[1]]["service_type"] >= 17:
customised["video"][swaprule[0]] = customised["video"][swaprule[1]]
customised["video"][swaprule[0]]["number"] = swaprule[0]
del customised["video"][swaprule[1]]
for service in sorted(customised["video"].keys()):
if service in range(1,1000):
if "interactive_name" in customised["video"][service]:
customised["video"][service]["interactive_name"] = str(customised["video"][service]["number"]) + " - " + customised["video"][service]["interactive_name"]
else:
customised["video"][service]["interactive_name"] = str(customised["video"][service]["number"]) + " - " + customised["video"][service]["service_name"]
]]>
</hacks>
</custommix>