Ejemplo n.º 1
0
    def onFirstInit(self):
        self.extraListControl = kodigui.ManagedControlList(self, self.EXTRA_LIST_ID, 5)
        self.relatedListControl = kodigui.ManagedControlList(self, self.RELATED_LIST_ID, 5)
        self.rolesListControl = kodigui.ManagedControlList(self, self.ROLES_LIST_ID, 5)

        self.progressImageControl = self.getControl(self.PROGRESS_IMAGE_ID)
        self.setup()
Ejemplo n.º 2
0
 def onFirstInit(self):
     self.sequenceControl = kodigui.ManagedControlList(
         self, self.SEQUENCE_LIST_ID, 22)
     self.addItemControl = kodigui.ManagedControlList(
         self, self.ADD_ITEM_LIST_ID, 22)
     self.itemOptionsControl = kodigui.ManagedControlList(
         self, self.ITEM_OPTIONS_LIST_ID, 22)
     self.start()
Ejemplo n.º 3
0
    def onFirstInit(self):
        self.subItemListControl = kodigui.ManagedControlList(self, self.SUB_ITEM_LIST_ID, 5)
        self.extraListControl = kodigui.ManagedControlList(self, self.EXTRA_LIST_ID, 5)
        self.relatedListControl = kodigui.ManagedControlList(self, self.RELATED_LIST_ID, 5)
        self.rolesListControl = kodigui.ManagedControlList(self, self.ROLES_LIST_ID, 5)
        self.progressImageControl = self.getControl(self.PROGRESS_IMAGE_ID)

        self.setup()

        self.setFocusId(self.PLAY_BUTTON_ID)
Ejemplo n.º 4
0
    def onFirstInit(self):
        self.audioPLListControl = kodigui.ManagedControlList(
            self, self.AUDIO_PL_LIST_ID, 5)
        self.videoPLListControl = kodigui.ManagedControlList(
            self, self.VIDEO_PL_LIST_ID, 5)

        self.fill()
        if self.audioPLListControl.size():
            self.setFocusId(self.AUDIO_PL_LIST_ID)
        else:
            self.setFocusId(self.VIDEO_PL_LIST_ID)
Ejemplo n.º 5
0
    def onFirstInit(self):
        self.settings = Settings()
        self.sectionList = kodigui.ManagedControlList(self,
                                                      self.SECTION_LIST_ID, 6)
        self.settingsList = kodigui.ManagedControlList(self,
                                                       self.SETTINGS_LIST_ID,
                                                       6)
        self.optionsList = kodigui.ManagedControlList(self,
                                                      self.OPTIONS_LIST_ID, 6)

        self.setProperty('heading', T(32343, 'Settings'))
        self.showSections()
        self.setFocusId(75)
        self.lastSection = None
        self.checkSection()
Ejemplo n.º 6
0
 def onFirstInit(self):
     self.handler.player.on('playlist.changed', self.playQueueCallback)
     self.handler.player.on('session.ended', self.sessionEnded)
     self.playlistListControl = kodigui.ManagedControlList(self, self.PLAYLIST_LIST_ID, 6)
     self.fillPlaylist()
     self.updatePlayingItem()
     self.setFocusId(self.PLAYLIST_LIST_ID)
Ejemplo n.º 7
0
    def onFirstInit(self):
        self.episodeListControl = kodigui.ManagedControlList(
            self, self.EPISODE_LIST_ID, 5)
        self.progressImageControl = self.getControl(self.PROGRESS_IMAGE_ID)

        self.extraListControl = kodigui.ManagedControlList(
            self, self.EXTRA_LIST_ID, 5)
        self.relatedListControl = kodigui.ManagedControlList(
            self, self.RELATED_LIST_ID, 5)
        self.rolesListControl = kodigui.ManagedControlList(
            self, self.ROLES_LIST_ID, 5)

        self._setup()
        self.selectEpisode()
        self.checkForHeaderFocus(xbmcgui.ACTION_MOVE_DOWN)
        self.setFocusId(self.PLAY_BUTTON_ID)
Ejemplo n.º 8
0
    def onFirstInit(self):
        self.episodeList = kodigui.ManagedControlList(self, self.EPISODE_LIST,
                                                      20)
        self.showHideButton()
        self.setProperty('show.hasRule', self.rule and '1' or '')
        if self.rule:
            self.setProperty('record.always', self.rule.recentOnly and 'RECENT'
                             or 'ALWAYS')
        else:
            self.setProperty(
                'record.always',
                (hasattr(self.series, 'recentOnly') and self.series.recentOnly)
                and 'RECENT' or 'ALWAYS')
        self.setProperty('series.title', self.series.title)
        self.setProperty('synopsis.title', 'Synopsis')
        self.setProperty('synopsis', self.series.synopsis)
        if self.series and self.series.filter:
            self.setProperty('is.movie', 'Movies' in self.series.filter and '1'
                             or '')
        self.updatePadding()

        focusEpisode = self.fillEpisodeList()

        if focusEpisode:
            self.setFocusId(self.EPISODE_LIST)
        elif self.onNow:
            self.setProperty('show.watch', '1')
            xbmc.sleep(100)
            self.setFocusId(self.WATCH_BUTTON)
        elif self.rule:
            self.setFocusId(self.PRIORITY_BUTTON)
        else:
            self.setFocusId(self.RECORD_BUTTON)
Ejemplo n.º 9
0
    def onFirstInit(self):
        player.PLAYER.on('session.ended', self.sessionEnded)
        player.PLAYER.on('post.play', self.postPlay)
        player.PLAYER.on('change.background', self.changeBackground)

        self.onDeckListControl = kodigui.ManagedControlList(
            self, self.ONDECK_LIST_ID, 5)
        self.relatedListControl = kodigui.ManagedControlList(
            self, self.RELATED_LIST_ID, 5)
        self.rolesListControl = kodigui.ManagedControlList(
            self, self.ROLES_LIST_ID, 5)

        util.DEBUG_LOG('VideoPlayerWindow: Starting session (ID: {0})'.format(
            id(self)))
        self.resetPassoutProtection()
        self.play(resume=self.resume)
Ejemplo n.º 10
0
    def onFirstInit(self):
        self.playlistListControl = kodigui.ManagedControlList(
            self, self.PLAYLIST_LIST_ID, 5)
        self.setProperties()

        self.fillPlaylist()
        self.setFocusId(self.PLAYLIST_LIST_ID)
Ejemplo n.º 11
0
 def onFirstInit(self):
     self.settingsList = kodigui.ManagedControlList(self,
                                                    self.SETTINGS_LIST_ID,
                                                    10)
     self.sliderControl = self.getControl(self.SLIDER_ID)
     self.fillSettingsList()
     self.updateItem()
Ejemplo n.º 12
0
    def onFirstInit(self):
        self.subItemListControl = kodigui.ManagedControlList(
            self, self.SUB_ITEM_LIST_ID, 5)

        self.setup()

        self.setFocusId(self.PLAY_BUTTON_ID)
Ejemplo n.º 13
0
    def onFirstInit(self):
        self.trackListControl = kodigui.ManagedControlList(
            self, self.TRACKS_LIST_ID, 5)

        self.setup()
        self.setFocusId(self.TRACKS_LIST_ID)
        self.checkForHeaderFocus(xbmcgui.ACTION_MOVE_DOWN)
Ejemplo n.º 14
0
 def onFirstInit(self):
     self.settingsList = kodigui.ManagedControlList(self,
                                                    self.SETTINGS_LIST_ID,
                                                    6)
     self.setProperty('heading', T(32343, 'Settings'))
     if self.viaOSD:
         self.setProperty('via.OSD', '1')
     self.showSettings(True)
     util.CRON.registerReceiver(self)
Ejemplo n.º 15
0
    def onFirstInit(self):
        self.videoListControl = kodigui.ManagedControlList(
            self, self.VIDEOS_LIST_ID, 5)

        if self.isIntercepted:
            self.getControl(
                self.CANCEL_BUTTON_ID).setLabel("[B]PLAY NORMAL[/B]")

        self.start()
Ejemplo n.º 16
0
    def onFirstInit(self):
        self._tasks = []
        self.seasonCount = 0
        self.airingItems = {}

        self.setProperty('thumb', self._show.thumb)
        self.setProperty('background', self._show.background)
        self.setProperty('title', self._show.title)
        self.setProperty('plot', self._show.plot or self._show.description)
        self.setProperty('section.action', self.sectionAction)
        self.setProperty('is.movie', self._show.type == 'MOVIE' and '1' or '')
        self.setProperty('dialog.top.color', '52FFFFFF')
        self.setProperty('schedule.top.color', '52FFFFFF')

        self.setAiringLabel()

        if self._show.type == 'MOVIE' and self._show.quality_rating:
            info = []
            if self._show.film_rating:
                info.append(self._show.film_rating.upper())
            if self._show.release_year:
                info.append(str(self._show.release_year))

            self.setProperty('info', u' / '.join(info) + u' / ')
            self.setProperty('stars', str(self._show.quality_rating / 2))
            self.setProperty('half.star', str(self._show.quality_rating % 2))
        elif self._show.type == 'SPORT':
            if self._show.showCounts.get('airing_count'):
                self.setProperty(
                    'info', '{0} {1}'.format(
                        self._show.showCounts['airing_count'],
                        self._show.showCounts['airing_count'] > 1 and T(32139)
                        or T(32138)))
            self.setProperty('plot', self._show.title)

        self.airingsList = kodigui.ManagedControlList(self,
                                                      self.AIRINGS_LIST_ID, 20)

        self.setupScheduleDialog()
        self.fillAirings()

        if self._show.type == 'SERIES':
            info = []
            if self.seasonCount:
                info.append('{0} {1}'.format(
                    self.seasonCount, self.seasonCount > 1 and T(32135)
                    or T(32134)))
            if self._show.showCounts.get('airing_count'):
                info.append('{0} {1}'.format(
                    self._show.showCounts['airing_count'],
                    self._show.showCounts['airing_count'] > 1 and T(32137)
                    or T(32136)))

            self.setProperty('info', u' / '.join(info))
Ejemplo n.º 17
0
    def start(self):
        if self.showList:
            self.showList.reInit(self, self.SHOW_LIST_ID)
        else:
            self.showList = kodigui.ManagedControlList(self, self.SHOW_LIST_ID,
                                                       5)
            self.fillShows()

        self.searchPanel = kodigui.ManagedControlList(self,
                                                      self.SEARCH_PANEL_ID, 6)
        self.fillSearchPanel()

        self.moviePanel = kodigui.ManagedControlList(self, self.MOVIE_PANEL_ID,
                                                     6)

        self.nowShowingPanel1 = kodigui.ManagedControlList(
            self, self.NOW_SHOWING_PANEL1_ID, 6)
        self.nowShowingPanel2 = kodigui.ManagedControlList(
            self, self.NOW_SHOWING_PANEL2_ID, 6)

        self.ruleList = kodigui.ManagedControlList(self, self.RULE_LIST_ID, 10)
        self.fillRules()

        if self.showList.size():
            self.setFocusId(self.SHOW_LIST_ID)
        else:
            self.setMode('SEARCH')

        self.cron.registerReceiver(self)
Ejemplo n.º 18
0
    def onFirstInit(self):
        self.playlistListControl = kodigui.ManagedControlList(
            self, self.PLAYLIST_LIST_ID, 9)
        self.setupSeekbar()

        self.fillPlaylist()
        self.selectPlayingItem()
        self.setFocusId(self.PLAYLIST_LIST_ID)

        self.updateProperties()
        if player.PLAYER.handler.playQueue and player.PLAYER.handler.playQueue.isRemote:
            player.PLAYER.handler.playQueue.on('change', self.updateProperties)
        player.PLAYER.on('playlist.changed', self.playQueueCallback)
Ejemplo n.º 19
0
    def onFirstInit(self):
        self._showingDialog = False
        self.filter = None

        self.typeList = kodigui.ManagedControlList(self, self.MENU_LIST_ID, 3)
        self.showList = kodigui.ManagedControlList(self, self.SHOW_PANEL_ID,
                                                   11)
        self.keysList = kodigui.ManagedControlList(self, self.KEY_LIST_ID, 10)
        self.keys = {}
        self.lastKey = None
        self.lastSelectedKey = None
        self.showItems = {}

        self.setFilter(None)

        self.delayedShowUpdater = DelayedShowUpdater(self)

        self._tasks = []

        self.fillTypeList()

        self.onReInit()
Ejemplo n.º 20
0
 def onFirstInit(self):
     self.pqueueList = kodigui.ManagedControlList(self, self.PQUEUE_LIST_ID,
                                                  14)
     self.setProperty('photo', 'script.plex/indicators/busy-photo.gif')
     self.getPlayQueue()
     self.start()
     self.osdTimer = kodigui.PropertyTimer(self._winID,
                                           4,
                                           'OSD',
                                           '',
                                           init_value=False,
                                           callback=self.osdTimerCallback)
     self.imageControl = self.getControl(600)
Ejemplo n.º 21
0
    def onFirstInit(self):
        if self.showPanelControl:
            self.showPanelControl.newControl(self)
            self.keyListControl.newControl(self)
            self.setFocusId(self.VIEWTYPE_BUTTON_ID)
        else:
            self.showPanelControl = kodigui.ManagedControlList(
                self, self.POSTERS_PANEL_ID, 5)
            self.keyListControl = kodigui.ManagedControlList(
                self, self.KEY_LIST_ID, 27)
            self.setProperty(
                'no.options', self.section.TYPE != 'photodirectory' and '1'
                or '')
            self.setProperty('unwatched.hascount',
                             self.section.TYPE == 'show' and '1' or '')
            self.setProperty('sort', self.sort)
            self.setProperty(
                'filter1.display',
                self.filterUnwatched and T(32368, 'UNWATCHED')
                or T(32345, 'All'))
            self.setProperty(
                'sort.display', SORT_KEYS[self.section.TYPE].get(
                    self.sort, SORT_KEYS['movie'].get(self.sort))['title'])
            self.setProperty(
                'media.type',
                TYPE_PLURAL.get(self.section.TYPE, self.section.TYPE))
            self.setProperty('media', self.section.TYPE)
            self.setProperty(
                'hide.filteroptions',
                self.section.TYPE == 'photodirectory' and '1' or '')

            self.setTitle()
            self.fill()
            if self.getProperty('no.content') or self.getProperty(
                    'no.content.filtered'):
                self.setFocusId(self.HOME_BUTTON_ID)
            else:
                self.setFocusId(self.POSTERS_PANEL_ID)
Ejemplo n.º 22
0
 def onInit(self):
     self.programsList = kodigui.ManagedControlList(self, 201, 11)
     self.categoryList = self.getControl(101)
     self.catList = []
     try:
         self.mcList()
     except:
         utils.log(traceback.format_exc())
         pass
     try:
         self.fillCategories()
     except:
         utils.log(traceback.format_exc())
         pass
Ejemplo n.º 23
0
    def onFirstInit(self):
        if self.touchMode:
            util.DEBUG_LOG('Touch mode: ENABLED')
            self.setProperty('touch.mode','True')
        else:
            util.DEBUG_LOG('Touch mode: DISABLED')
        self.started = True

        self.propertyTimer = kodigui.PropertyTimer(self._winID,util.getSetting('overlay.timeout',0),'show.overlay','', callback=self.overlayTimerCallback)
        self.currentDetailsTimer = kodigui.PropertyTimer(self._winID,5,'show.current','')
        self.seekBarTimer = kodigui.PropertyTimer(self._winID,5,'show.seekbar','')

        self.channelList = kodigui.ManagedControlList(self,201,3)
        self.currentProgress = self.getControl(250)

        #Add item to dummy list - this list allows right click on video to bring up the context menu
        self.getControl(210).addItem(xbmcgui.ListItem(''))

        self.start()
Ejemplo n.º 24
0
    def _onFirstInit(self):
        self.resetTimeout()

        self.bigSeekHideTimer = kodigui.PropertyTimer(self._winID, 0.5, 'hide.bigseek')

        if self.handler.playlist:
            self.handler.playlist.on('change', self.updateProperties)

        self.seekbarControl = self.getControl(self.SEEK_IMAGE_ID)
        self.positionControl = self.getControl(self.POSITION_IMAGE_ID)
        self.bifImageControl = self.getControl(self.BIF_IMAGE_ID)
        self.selectionIndicator = self.getControl(self.SELECTION_INDICATOR)
        self.selectionBox = self.getControl(203)
        self.bigSeekControl = kodigui.ManagedControlList(self, self.BIG_SEEK_LIST_ID, 12)
        self.bigSeekGroupControl = self.getControl(self.BIG_SEEK_GROUP_ID)
        self.initialized = True
        self.setBoolProperty('subtitle.downloads', util.getSetting('subtitle_downloads', False))
        self.updateProperties()
        self.videoSettingsHaveChanged()
        self.update()
Ejemplo n.º 25
0
    def onFirstInit(self):
        self.setProperty('dropdown', self.setDropdownProp and '1' or '')
        self.setProperty('header', self.header)
        self.optionsList = kodigui.ManagedControlList(self,
                                                      self.OPTIONS_LIST_ID, 8)
        self.showOptions()
        height = min(66 * 14, (len(self.options) * 66)) + 80
        self.getControl(100).setPosition(self.x, self.y)

        shadowControl = self.getControl(110)
        if self.header:
            shadowControl.setHeight(height + 86)
            self.getControl(111).setHeight(height + 6)
        else:
            shadowControl.setHeight(height)

        self.setProperty('show', '1')
        self.setProperty('close.direction', self.closeDirection)
        if self.closeOnPlaybackEnded:
            from lib import player
            player.PLAYER.on('session.ended', self.playbackSessionEnded)
Ejemplo n.º 26
0
    def onFirstInit(self):
        self.sectionList = kodigui.ManagedControlList(self,
                                                      self.SECTION_LIST_ID, 7)
        self.serverList = kodigui.ManagedControlList(self, self.SERVER_LIST_ID,
                                                     10)
        self.userList = kodigui.ManagedControlList(self, self.USER_LIST_ID, 3)

        self.hubControls = (
            kodigui.ManagedControlList(self, self.HUB_AR16X9_00, 5),
            kodigui.ManagedControlList(self, self.HUB_POSTER_01, 5),
            kodigui.ManagedControlList(self, self.HUB_POSTER_02, 5),
            kodigui.ManagedControlList(self, self.HUB_POSTER_03, 5),
            kodigui.ManagedControlList(self, self.HUB_POSTER_04, 5),
            kodigui.ManagedControlList(self, self.HUB_SQUARE_05, 5),
            kodigui.ManagedControlList(self, self.HUB_AR16X9_06, 5),
            kodigui.ManagedControlList(self, self.HUB_POSTER_07, 5),
            kodigui.ManagedControlList(self, self.HUB_POSTER_08, 5),
            kodigui.ManagedControlList(self, self.HUB_SQUARE_09, 5),
            kodigui.ManagedControlList(self, self.HUB_SQUARE_10, 5),
            kodigui.ManagedControlList(self, self.HUB_SQUARE_11, 5),
            kodigui.ManagedControlList(self, self.HUB_SQUARE_12, 5),
            kodigui.ManagedControlList(self, self.HUB_POSTER_13, 5),
            kodigui.ManagedControlList(self, self.HUB_POSTER_14, 5),
            kodigui.ManagedControlList(self, self.HUB_POSTER_15, 5),
            kodigui.ManagedControlList(self, self.HUB_POSTER_16, 5),
            kodigui.ManagedControlList(self, self.HUB_AR16X9_17, 5),
            kodigui.ManagedControlList(self, self.HUB_AR16X9_18, 5),
            kodigui.ManagedControlList(self, self.HUB_AR16X9_19, 5),
            kodigui.ManagedControlList(self, self.HUB_SQUARE_20, 5),
            kodigui.ManagedControlList(self, self.HUB_SQUARE_21, 5),
            kodigui.ManagedControlList(self, self.HUB_SQUARE_22, 5),
            kodigui.ManagedControlList(self, self.HUB_AR16X9_23, 5),
        )

        self.hubFocusIndexes = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 16,
                                17, 18, 19, 20, 21, 22, 13, 14, 15, 23)

        self.bottomItem = 0
        if self.serverRefresh():
            self.setFocusId(self.SECTION_LIST_ID)

        self.hookSignals()
        util.CRON.registerReceiver(self)
Ejemplo n.º 27
0
 def onFirstInit(self):
     self.setWindowProperties()
     self.recordingList = kodigui.ManagedControlList(self,self.RECORDING_LIST_ID,10)
     self.fillRecordings()
Ejemplo n.º 28
0
 def onFirstInit(self):
     self.optionsList = kodigui.ManagedControlList(self,
                                                   self.OPTIONS_LIST_ID, 8)
     self.setProperty('heading', self.heading)
     self.showOptions()
     util.CRON.registerReceiver(self)
Ejemplo n.º 29
0
 def onFirstInit(self):
     self.videoListControl = kodigui.ManagedControlList(self, self.VIDEOS_LIST_ID, 5)
     self.start()
Ejemplo n.º 30
0
 def onFirstInit(self):
     self.attributeList = kodigui.ManagedControlList(self, self.ATTRIBUTE_LIST_ID, 10)
     # self.sliderControl = self.getControl(self.SLIDER_ID)
     self.fillAttributeList()