def fillList(self):
    data = []
    alreadyFound = set()
    childlist = self.param.get(self.CHILDNAME)
    if (childlist is not None):
        for child in childlist:
            url = child.get('url')
            key = self.computeKey(child)
            if (url is None):
                child['invalid'] = True
            if (key in alreadyFound):
                AVNLog.error('duplicate user app found, ignoring %s', url)
                while (key in alreadyFound):
                    key = (key + 'x')
                child['name'] = key
                child['invalid'] = True
            else:
                child['name'] = key
                alreadyFound.add(key)
            item = child.copy()
            item['canDelete'] = True
            item['source'] = 'user'
            data.append(item)
    serverAddons = self.httpServer.getParamValue(self.CHILDNAME)
    nr = 0
    if (serverAddons is not None):
        for addon in serverAddons:
            newAddon = addon.copy()
            newAddon['canDelete'] = False
            newAddon['name'] = ('server:%d' % nr)
            newAddon['source'] = 'legacy'
            nr += 1
            data.append(newAddon)
    for addon in data:
        url = addon.get('url')
        if (url is None):
            addon['invalid'] = True
        if (not url.startswith('http')):
            userFile = self.findFileForUrl(url)
            if (userFile is None):
                AVNLog.error('error: user url %s not found', url)
                addon['invalid'] = True
        if (addon.get('title') == ''):
            del addon['title']
        keepUrl = False
        if ((addon.get('keepUrl') is None) or (addon.get('keepUrl') == '')):
            if addon.get('url').startswith('http'):
                keepUrl = True
        elif (str(addon.get('keepUrl')).lower() == 'true'):
            keepUrl = True
        addon['keepUrl'] = keepUrl
        icon = addon['icon']
        if (not icon.startswith('http')):
            if (not icon.startswith('/user')):
                icon = ('/user/' + icon)
                addon['icon'] = icon
            iconpath = self.findFileForUrl(icon)
            if (iconpath is None):
                AVNLog.error('icon path %s for %s not found, ignoring entry', icon, addon['url'])
                addon['invalid'] = True
    self.addonList = data
    self.setInfo('main', ('active, %d addons' % len(data)), WorkerStatus.NMEA)
    return
def fillList(self):
    data = []
    alreadyFound = set()
    childlist = self.param.get(self.CHILDNAME)
    if (childlist is not None):
        for child in childlist:
            url = child.get('url')
            key = self.computeKey(child)
            if (url is None):
                child['invalid'] = True
            if (key in alreadyFound):
                AVNLog.error('duplicate user app found, ignoring %s', url)
                while (key in alreadyFound):
                    key = (key + 'x')
                child['name'] = key
                child['invalid'] = True
            else:
                child['name'] = key
                alreadyFound.add(key)
            item = child.copy()
            item['canDelete'] = True
            item['source'] = 'user'
            data.append(item)
    serverAddons = self.httpServer.getParamValue(self.CHILDNAME)
    nr = 0
    if (serverAddons is not None):
        for addon in serverAddons:
            newAddon = addon.copy()
            newAddon['canDelete'] = False
            newAddon['name'] = ('server:%d' % nr)
            newAddon['source'] = 'legacy'
            nr += 1
            data.append(newAddon)
    for addon in data:
        url = addon.get('url')
        if (url is None):
            addon['invalid'] = True
        if (not url.startswith('http')):
            userFile = self.findFileForUrl(url)
            if (userFile is None):
                AVNLog.error('error: user url %s not found', url)
                addon['invalid'] = True
        if (addon.get('title') == ):
            del addon['title']
        keepUrl = False
        if ((addon.get('keepUrl') is None) or (addon.get('keepUrl') == )):
            if addon.get('url').startswith('http'):
                keepUrl = True
        elif (str(addon.get('keepUrl')).lower() == 'true'):
            keepUrl = True
        addon['keepUrl'] = keepUrl
        icon = addon['icon']
        if (not icon.startswith('http')):
            if (not icon.startswith('/user')):
                icon = ('/user/' + icon)
                addon['icon'] = icon
            iconpath = self.findFileForUrl(icon)
            if (iconpath is None):
                AVNLog.error('icon path %s for %s not found, ignoring entry', icon, addon['url'])
                addon['invalid'] = True
    self.addonList = data
    self.setInfo('main', ('active, %d addons' % len(data)), WorkerStatus.NMEA)
    return