|
|
@ -40,14 +40,23 @@ class mmServer( object ): |
|
|
|
|
|
|
|
links = dict(); |
|
|
|
|
|
|
|
for theChan in ctl.getChannels(model.srvid): |
|
|
|
chanlist = ctl.getChannels(model.srvid); |
|
|
|
# sometimes, ICE seems to return the Channel list in a weird order. |
|
|
|
while len(chanlist): |
|
|
|
#print len(chanlist) |
|
|
|
for theChan in chanlist: |
|
|
|
# Channels - Fields: 0 = ID, 1 = Name, 2 = Parent-ID, 3 = Links |
|
|
|
|
|
|
|
if( theChan[2] == -1 ): |
|
|
|
# No parent |
|
|
|
self.channels[theChan[0]] = mmChannel( theChan ); |
|
|
|
else: |
|
|
|
elif theChan[2] in self.channels: |
|
|
|
# parent already known |
|
|
|
self.channels[theChan[0]] = mmChannel( theChan, self.channels[theChan[2]] ); |
|
|
|
else: |
|
|
|
continue; |
|
|
|
|
|
|
|
chanlist.remove( theChan ); |
|
|
|
|
|
|
|
self.channels[theChan[0]].serverId = self.id; |
|
|
|
|
|
|
|