2015-03-24, 22:11
hi ! i made this texbox for a add-on
whit this python code :
i would like to insert in the texbox a thumbnail image or a cleart like with the info (plot) i have made .
could someone help me with this?
Thanks
whit this python code :
Code:
def info(item):
logger.info("pelisalacarta.bricocine trailer")
url=item.url
data = scrapertools.cachePage(url)
data = re.sub(r"\n|\r|\t|\s{2}| ","",data)
if "temporada" in item.title:
title= scrapertools.get_match(data,'<span class="title">.*?Torrent.*?([^"]+) ')
else:
title= scrapertools.get_match(data,'<span class="title">([^"]+)</span>')
title = title.replace(title,"[COLOR aqua][B]"+title+"[/B][/COLOR]")
plot = scrapertools.get_match(data,'<div class="description" itemprop="text.*?">([^<]+).*?</div></div></div>')
plot_title = "Sinopsis" + "[CR]"
plot_title = plot_title.replace(plot_title,"[COLOR red]"+plot_title+"[/COLOR]")
plot= plot_title + plot
plot = plot.replace(plot,"[COLOR white][B]"+plot+"[/B][/COLOR]")
fanart="http://s11.postimg.org/qu66qpjz7/zentorrentsfanart.jpg"
tbd = TextBox("DialogTextViewer.xml", os.getcwd(), "Default")
tbd.ask(title, plot,fanart)
del tbd
return
try:
import xbmc, xbmcgui
class TextBox( xbmcgui.WindowXMLDialog ):
""" Create a skinned textbox window """
def __init__( self, *args, **kwargs):
pass
def onInit( self ):
try:
self.getControl( 5 ).setText( self.text )
self.getControl( 1 ).setLabel( self.title )
except: pass
def onClick( self, controlId ):
pass
def onFocus( self, controlId ):
pass
def onAction( self, action ):
self.close()
def ask(self, title, text, image ):
self.title = title
self.text = text
self.doModal()
except:
pass
could someone help me with this?
Thanks