Пример #1
0
 def onActionWatch(self, action):
     if action == xbmcgui.ACTION_GESTURE_SWIPE_LEFT:
         return self.setMode('SEARCH', focus=self.SEARCH_EDIT_ID)
     elif action == xbmcgui.ACTION_MOVE_DOWN or action == xbmcgui.ACTION_MOVE_UP or action == xbmcgui.ACTION_MOVE_RIGHT or action == xbmcgui.ACTION_MOVE_LEFT:
         if self.getFocusId(
         ) != self.SHOW_LIST_ID and not util.getGlobalProperty(
                 'NO_RECORDINGS'):
             return self.setFocusId(self.SHOW_LIST_ID)
Пример #2
0
    def setSearch(self, category=None):
        #self.searchTerms = self.getControl(self.SEARCH_EDIT_ID).getText() or ''
        if category:
            self.searchTerms = ''
            self.category = category
            catDisplay = {
                'series': 'Shows',
                'movie': 'Movies',
                'sport': 'Sports',
                'nowshowing': 'Now Showing'
            }
            util.setGlobalProperty('search.terms', catDisplay[category])
            if category == 'nowshowing':
                self.fillNowShowing()
                util.setGlobalProperty('movie.posters', '')
                util.setGlobalProperty('now.showing', '1')
            else:
                if self.nowShowing:
                    self.nowShowing.pos = 0
                util.setGlobalProperty('now.showing', '')
                if category == 'movie':
                    util.setGlobalProperty('movie.posters', '1')
                else:
                    util.setGlobalProperty('movie.posters', '')

                self.fillSearchPanel()
        else:
            self.searchTerms = xbmcgui.Dialog().input(T(32812),
                                                      self.searchTerms)
            if not self.searchTerms:
                return

            util.setGlobalProperty('now.showing', '')
            util.setGlobalProperty('movie.posters', '')
            self.category = ''
            util.setGlobalProperty('search.terms', self.searchTerms)
            self.fillSearchPanel()

        if util.getGlobalProperty('NO_RESULTS'):
            self.setFocusId(202)
        else:
            if category != 'nowshowing':
                if category == 'movie':
                    self.setFocusId(self.MOVIE_PANEL_ID)
                else:
                    self.setFocusId(self.SEARCH_PANEL_ID)
Пример #3
0
    def mode(self,val):
        if util.getGlobalProperty('DVR_MODE') == 'RULES' and val != 'RULES':
            self.moveRule(None)

        util.setGlobalProperty('DVR_MODE',val)
Пример #4
0
 def mode(self):
     return util.getGlobalProperty('DVR_MODE')
Пример #5
0
def exporting():
    return bool(util.getGlobalProperty('EXPORTING'))
Пример #6
0
def canceled():
    return bool(util.getGlobalProperty('EXPORT_CANCELED'))