How can the plugin show picture and description beside of name from the server (xml)?
What have i to add to this command?
i know how to show the name (plugins cont):
PHP
def downloadxmlpage(self):
url = 'http://server.net/Plugins.xml'
getPage(url).addCallback(self._gotPageLoad).addErrback(self.errorLoad)
def _gotPageLoad(self, data):
self.xml = data
try:
if self.xml:
xmlstr = minidom.parseString(self.xml)
else:
self.downloading = False
self['info'].setText('')
return
self.data = []
self.names = []
icount = 0
list = []
xmlparse = xmlstr
self.xmlparse = xmlstr
for plugins in xmlstr.getElementsByTagName('plugins'):
self.names.append(plugins.getAttribute('cont').encode('utf8'))
Display More
PHP
<plugins cont=" MultiMedia">
<plugin name=" XXX Player">
<url>"http://server.net/xxx.ipk"</url>
</plugin>
</plugins>
<plugins cont=" Media">
<plugin name=" YYY Player">
<url>"http://server.net/yyp.ipk"</url>
</plugin>
</plugins>
for the name (plugin name) i use this command:
PHP
def __init__(self, session, xmlparse, selection):
self.skin = Install.skin
Screen.__init__(self, session)
self.xmlparse = xmlparse
self.selection = selection
list = []
for plugins in self.xmlparse.getElementsByTagName('plugins'):
if str(plugins.getAttribute('cont').encode('utf8')) == self.selection:
for plugin in plugins.getElementsByTagName('plugin'):
list.append(plugin.getAttribute('name').encode('utf8'))
list.sort()
self['text'] = MenuList(list)
self['actions'] = ActionMap(['SetupActions'], {'ok': self.selclicked,
'cancel': self.close}, -2)
def selclicked(self):
try:
selection_country = self['text'].getCurrent()
except:
return
for plugins in self.xmlparse.getElementsByTagName('plugins'):
if str(plugins.getAttribute('cont').encode('utf8')) == self.selection:
for plugin in plugins.getElementsByTagName('plugin'):
if plugin.getAttribute('name').encode('utf8') == selection_country:
urlserver = str(plugin.getElementsByTagName('url')[0].childNodes[0].data)
pluginname = plugin.getAttribute('name').encode('utf8')
self.prombt(urlserver, pluginname)
Display More
I want to add picture (.png) and description besides the names in the plugin.
Any help appreciated.
