2021-07-11, 08:37
Hi,
I'm getting a transparent background while using xbmcgui.Dialog().info() with a listitem in my script addon. How can I fix this issue?
I'm getting a transparent background while using xbmcgui.Dialog().info() with a listitem in my script addon. How can I fix this issue?
python:self.infoDialog = InfoDialog(program, playChannel2, recordProgram, notification, ExtendedInfo, onRedrawEPG,
channelIdx, viewStartDate)
python:class InfoDialog():
def __init__(self, program, playChannel2, recordProgram, notification, ExtendedInfo, onRedrawEPG, channelIdx, viewStartDate):
self.program = program
self.playChannel2 = playChannel2
self.recordProgram = recordProgram
self.notification = notification
self.ExtendedInfo = ExtendedInfo
self.onRedrawEPG = onRedrawEPG
self.channelIdx = channelIdx
self.viewStartDate = viewStartDate
self.VideoInfo = self.VideoInfo()
def VideoInfo(self):
listitem = xbmcgui.ListItem()
self.displayVideoInfo(listitem)
def displayVideoInfo(self, listitem):
listitem.select(True)
if skin_separate_category or skin_separate_year_of_production or skin_separate_director or skin_separate_episode or skin_separate_allowed_age_icon or skin_separate_program_progress or skin_separate_program_actors:
# This mean we'll need to parse program description
descriptionParser = src.ProgramDescriptionParser(self.program.description)
if skin_separate_category:
try:
category = descriptionParser.extractCategory()
if category == strings(NO_CATEGORY):
category = self.program.categoryA
except:
category = ''
if skin_separate_year_of_production:
try:
year = descriptionParser.extractProductionDate()
if year == '':
year = self.program.productionDate
except:
year == ''
if skin_separate_director:
try:
director = descriptionParser.extractDirector()
if director == '':
director = self.program.director
except:
director = ''
if skin_separate_episode:
try:
episode = descriptionParser.extractEpisode()
if episode == '':
episode = self.program.episode
except:
episode == ''
if skin_separate_allowed_age_icon:
try:
icon, age = descriptionParser.extractAllowedAge()
except:
icon = ''
age = ''
if skin_separate_program_actors:
try:
actors = descriptionParser.extractActors()
if actors == '':
actors = self.program.actor
except:
actors == ''
if skin_separate_rating:
try:
rating = descriptionParser.extractRating()
except:
rating = ''
description = descriptionParser.description
try:
e = re.compile('E\s*(\d+)')
ep = e.search(episode).group(1)
except:
ep = 0
try:
s = re.compile('.*S\s*(\d+)')
se = s.search(episode).group(1)
except:
se = 0
actors = actors.split(',')
listitem.setArt({ 'poster': self.program.imageSmall })
listitem.setInfo('video', {'plot': str(description),
'title': str(self.program.title),
'tvshowtitle': str(self.program.title),
'episode': int(ep),
'season': int(se),
'genre': str(category),
'rating': str(rating),
'cast': list(actors),
'year': str(year),
'director': str(director),
'mpaa': str(age),
'duration': str(self.calctimeLeft(self.program))})
xbmcgui.Dialog().info(listitem)