def onInit( self ): try: self.listitem = database.getContainerMovieSets( self.idset )[ 0 ] if not self.listitem: self._close_dialog() else: self.listitem = self.listitem[ 0 ] self.addItem( self.listitem ) self.getControl( 50 ).setVisible( 0 ) self.getControl( 6 ).setLabel( "Manager" ) self.getControl( 12 ).setLabel( __string__( 20413 ) ) #desable trailer button 15 xbmc bug !!! if user click try: self.getControl( 15 ).setEnabled( 0 ) except: pass try: self.getControl( 150 ).setVisible( 0 ) listitems = [] for cast, role, movie in database.getCastAndRoleOfSet( self.idset ): label = " ".join( [ _unicode( cast ), __string__( 20347 ), _unicode( role ), __string__( 1405 ), _unicode( movie ) ] ) icon = TBN.get_cached_actor_thumb( cast ) listitems.append( xbmcgui.ListItem( label, "", icon, icon ) ) self.getControl( 150 ).addItems( listitems ) except: log.error.exc_info( sys.exc_info(), self ) self.getControl( 5 ).setEnabled( 0 ) if self.setfocus: self.setFocusId( self.setfocus ) except: log.error.exc_info( sys.exc_info(), self ) self._close_dialog()
def onInit( self ): try: self.listitem = getContainerMovieSets( self.idset )[ 0 ] if not self.listitem: self._close_dialog() else: self.listitem = self.listitem[ 0 ] self.addItem( self.listitem ) self.getControl( 50 ).setVisible( 0 ) self.getControl( 6 ).setLabel( "Manager" ) self.getControl( 12 ).setLabel( LangXBMC( 20413 ) ) #desable trailer button 15 xbmc bug !!! if user click try: self.getControl( 15 ).setEnabled( 0 ) except: pass con = cur = None if self.actorsdb: con, cur = self.actorsdb.getConnection() try: self.getControl( 150 ).setVisible( 0 ) listitems = [] for idActor, cast, role, movie in DATABASE.getCastAndRoleOfSet( self.idset ): try: # cast est role dans movie label = " ".join( [ _unicode( cast ), LangXBMC( 20347 ), _unicode( role ), LangXBMC( 1405 ), _unicode( movie ) ] ) art = DATABASE.getArtForItem( idActor, "actor" ) icon = "" if art: icon = art.get( "thumb" ) if icon: icon = "image://" + quote_plus( icon ) icon = icon or TBN.get_cached_actor_thumb( cast ) listitem = xbmcgui.ListItem( label, "", icon, icon ) if cur: actor = self.actorsdb.getActor( cur, strActor=cast ) bio = self.clean_bio( actor.get( "biography" ) or "" ) listitem.setInfo( "video", { "title": cast, "plot": bio } ) if actor: actor[ "biography" ] = bio listitem = self.setActorProperties( listitem, actor ) #print actor listitems.append( listitem ) except: LOGGER.error.print_exc() self.getControl( 150 ).addItems( listitems ) except: LOGGER.error.print_exc() self.getControl( 5 ).setEnabled( 0 ) if hasattr( con, "close" ): con.close() if self.setfocus: self.setFocusId( self.setfocus ) except: LOGGER.error.print_exc() self._close_dialog()
def onInit(self): try: self.listitem = database.getContainerMovieSets(self.idset)[0] if not self.listitem: self._close_dialog() else: self.listitem = self.listitem[0] self.addItem(self.listitem) self.getControl(50).setVisible(0) self.getControl(6).setLabel("Manager") self.getControl(12).setLabel(__string__(20413)) #desable trailer button 15 xbmc bug !!! if user click try: self.getControl(15).setEnabled(0) except: pass try: self.getControl(150).setVisible(0) listitems = [] for cast, role, movie in database.getCastAndRoleOfSet( self.idset): label = " ".join([ _unicode(cast), __string__(20347), _unicode(role), __string__(1405), _unicode(movie) ]) icon = TBN.get_cached_actor_thumb(cast) listitems.append( xbmcgui.ListItem(label, "", icon, icon)) self.getControl(150).addItems(listitems) except: log.error.exc_info(sys.exc_info(), self) self.getControl(5).setEnabled(0) if self.setfocus: self.setFocusId(self.setfocus) except: log.error.exc_info(sys.exc_info(), self) self._close_dialog()