1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| if msg == 'do_set' and param['value']!=0:
forecasts = []
dom = minidom.parse(basepath+"/"+selectedset+".m8s")
clearMediaset(param['value'])
for node in dom.getElementsByTagName("set"):
print node.attributes["id"].value
print node.attributes["path"].value
pos=int(int(node.attributes["id"].value)+((param['value']-1)*16))
print pos
path=pos,node.attributes["path"].value
modul8.setValue('direct_media_change',path,0)
elif msg == "wr_set" and param['value']!=0:
mset=Document()
mediaset_l=modul8.getValue('info_media_pathsAndNames', 0)
top_node=mset.createElement("mediaset")
top_node.attributes["version"]="1.0"
mset.appendChild(top_node)
id=0
for n in range ((int(param['value']-1)*16),(int(param['value']-1)*16+16),1):
print n
node=mset.createElement("set")
node.attributes["id"]=str(id)
node.attributes["path"]=str(mediaset_l[n][0])
top_node.appendChild(node)
id=id+1
xmlfile=open(basepath+module.getValue('filename', 0)+".m8s","w")
mset.writexml(xmlfile)
xmlfile.close()
refreshtree(basepath)
elif msg=='mediasets_list':
selectedset = file_list[int(param['selection'])]
elif msg == "clear" and param['value']!=0:
clearMediaset(param['value'])
elif msg == "clearall":
clearAllMediaset() |
Partager