Exemplo n.º 1
0
 def infoButtonClicked(self):
     fallback = 'script.plex/thumb_fallbacks/{0}.png'.format(self.mediaItem.type == 'show' and 'show' or 'music')
     genres = u' / '.join([g.tag for g in util.removeDups(self.mediaItem.genres())][:6])
     w = info.InfoWindow.open(
         title=self.mediaItem.title,
         sub_title=genres,
         thumb=self.mediaItem.defaultThumb,
         thumb_fallback=fallback,
         info=self.mediaItem.summary,
         background=self.getProperty('background'),
         is_square=bool(isinstance(self, ArtistWindow))
     )
     del w
     util.garbageCollect()
Exemplo n.º 2
0
    def fill(self):
        self.mediaItem.reload(includeRelated=1, includeRelatedCount=10, includeExtras=1, includeExtrasCount=10)
        self.setProperty('artist.title', self.mediaItem.title)
        genres = u' / '.join([g.tag for g in util.removeDups(self.mediaItem.genres())][:6])
        self.setProperty('artist.genre', genres)
        items = []
        idx = 0
        for album in sorted(self.mediaItem.albums(), key=lambda x: x.year):
            mli = self.createListItem(album)
            if mli:
                mli.setProperty('index', str(idx))
                mli.setProperty('year', album.year)
                mli.setProperty('thumb.fallback', 'script.plex/thumb_fallbacks/music.png')
                items.append(mli)
                idx += 1

        self.subItemListControl.reset()
        self.subItemListControl.addItems(items)