|
@ -333,11 +333,17 @@ def mmng_tree( request, server ): |
|
|
for chanid in srv.channels: |
|
|
for chanid in srv.channels: |
|
|
channel = srv.channels[chanid] |
|
|
channel = srv.channels[chanid] |
|
|
state = None # "removed" |
|
|
state = None # "removed" |
|
|
|
|
|
|
|
|
|
|
|
if channel.parent is not None: |
|
|
|
|
|
parent = channel.parent.chanid |
|
|
|
|
|
else: |
|
|
|
|
|
parent = -1 |
|
|
|
|
|
|
|
|
chanlist.append({ |
|
|
chanlist.append({ |
|
|
"type": "channel", |
|
|
"type": "channel", |
|
|
"id": channel.chanid, |
|
|
"id": channel.chanid, |
|
|
"name": channel.name, |
|
|
"name": channel.name, |
|
|
"parent": channel.parent and channel.parent.chanid or -1, |
|
|
|
|
|
|
|
|
"parent": parent, |
|
|
"position": channel.position, |
|
|
"position": channel.position, |
|
|
"state": state == None and (channel.temporary and "temporary" or "permanent") or state |
|
|
"state": state == None and (channel.temporary and "temporary" or "permanent") or state |
|
|
}) |
|
|
}) |
|
|