示例#1
0
    def showPanelClicked(self):
        mli = self.showPanelControl.getSelectedItem()
        if not mli or not mli.dataSource:
            return

        updateWatched = False
        if self.section.TYPE == 'show':
            self.processCommand(
                opener.handleOpen(subitems.ShowWindow,
                                  media_item=mli.dataSource,
                                  parent_list=self.showPanelControl))
            updateWatched = True
        elif self.section.TYPE == 'movie':
            self.processCommand(
                opener.handleOpen(preplay.PrePlayWindow,
                                  video=mli.dataSource,
                                  parent_list=self.showPanelControl))
            updateWatched = True
        elif self.section.TYPE == 'artist':
            self.processCommand(
                opener.handleOpen(subitems.ArtistWindow,
                                  media_item=mli.dataSource,
                                  parent_list=self.showPanelControl))
        elif self.section.TYPE in ('photo', 'photodirectory'):
            self.showPhoto(mli.dataSource)

        if not mli.dataSource.exists():
            self.showPanelControl.removeItem(mli.pos())
            return

        if updateWatched:
            self.updateUnwatched(mli)
示例#2
0
 def infoButtonClicked(self):
     opener.handleOpen(
         info.InfoWindow,
         title=self.video.title,
         sub_title=self.getProperty('info'),
         thumb=self.video.type == 'episode' and self.video.thumb or self.video.defaultThumb,
         thumb_fallback='script.plex/thumb_fallbacks/{0}.png'.format(self.video.type == 'episode' and 'show' or 'movie'),
         info=self.video.summary,
         background=self.getProperty('background'),
         is_16x9=self.video.type == 'episode'
     )
示例#3
0
    def sectionClicked(self):
        item = self.sectionList.getSelectedItem()
        if not item:
            return

        section = item.dataSource

        if section.type in ('show', 'movie', 'artist', 'photo'):
            self.processCommand(opener.sectionClicked(section))
        elif section.type in ('playlists', ):
            self.processCommand(opener.handleOpen(playlists.PlaylistsWindow))
示例#4
0
    def infoButtonClicked(self):
        mli = self.episodeListControl.getSelectedItem()
        if not mli:
            return

        episode = mli.dataSource

        if episode.index:
            subtitle = u'{0} {1} {2} {3}'.format(T(32303, 'Season'),
                                                 episode.parentIndex,
                                                 T(32304,
                                                   'Episode'), episode.index)
        else:
            subtitle = episode.originallyAvailableAt.asDatetime('%B %d, %Y')

        opener.handleOpen(
            info.InfoWindow,
            title=episode.title,
            sub_title=subtitle,
            thumb=episode.thumb,
            thumb_fallback='script.plex/thumb_fallbacks/show.png',
            info=episode.summary,
            background=self.getProperty('background'),
            is_16x9=True)
示例#5
0
 def showAudioPlayer(self):
     import musicplayer
     self.processCommand(opener.handleOpen(musicplayer.MusicPlayerWindow))
示例#6
0
 def showPlaylist(self):
     self.processCommand(
         opener.handleOpen(currentplaylist.CurrentPlaylistWindow))
示例#7
0
 def openWindow(self, window_class, **kwargs):
     self.processCommand(opener.handleOpen(window_class, **kwargs))