Ejemplo n.º 1
0
    def __init__(self, isService=0):
        try:
            Base.__init__(self)
            self._addonMedia = xbmc.translatePath(
                os.path.join(
                    os.path.join(
                        os.path.join(
                            os.path.join(self._addonPath, 'resources'),
                            'skins'), 'default'), 'media'))

            self._executeScript = self._addon.getSetting('execute_script')
            self._pathScript = self._addon.getSetting('script_path')
            self._enableService = self._addon.getSetting('enable_service')
            self._enableMonday = self._addon.getSetting('enable_monday')
            self._enableTuesday = self._addon.getSetting('enable_tuesday')
            self._enableWednesday = self._addon.getSetting('enable_wednesday')
            self._enableThursday = self._addon.getSetting('enable_thursday')
            self._enableFriday = self._addon.getSetting('enable_friday')
            self._enableSaturday = self._addon.getSetting('enable_saturday')
            self._enableSunday = self._addon.getSetting('enable_sunday')
            self._runTime = self._addon.getSetting('run_time')
            self._lastUpdate = self._addon.getSetting('last_update')

            self._isService = isService
            if self._isService == 1:
                if self._enableService == 'true':
                    self.serviceUpdateEpg()
            else:
                self.getParams()
                if self._action == '':
                    self.runUpdateEpg()
                else:
                    self.setAction()
        except Exception, e:
            self.addLog('Epg::__init__', 'ERROR: (' + repr(e) + ')', logErorr)
Ejemplo n.º 2
0
 def __init__(self, *args, **kwargs):
     try:
         Base.__init__(self)
         xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
         self._orgName = ''
         self._userName = ''
         self._icon = ''
         self._correction = 120
         self._result = 0
     except Exception, e:
         self.addLog('ChannelEdit::__init__', 'ERROR: (' + repr(e) + ')',
                     logErorr)
Ejemplo n.º 3
0
 def __init__(self):
     try:
         Base.__init__(self)
         #channels dir
         channelsDir = xbmc.translatePath(
             self._addon.getAddonInfo('profile')) + 'channels'
         if not os.path.exists(channelsDir):
             os.makedirs(channelsDir)
         #channel list
         self._fileChannels = channelsDir + os.path.sep + channels_file
         self._data = []
     except Exception, e:
         self.addLog('ChannelList::__init__', 'ERROR: (' + repr(e) + ')',
                     logErorr)
Ejemplo n.º 4
0
 def __init__(self, progress):
     try:
         Base.__init__(self)
         self._progress = progress
         self._channels = ChannelList()
         self._programmes = ProgrammeList()
         self._countDay = int(self._addon.getSetting('count_day')) + 1
         self._fullDesc = self._addon.getSetting('full_desc')
         self._pathXml = xbmc.translatePath(
             os.path.join(self._addon.getSetting('xmltv_path'),
                          'xmltv.xml'))
         self._channels.loadChannelsFromFile(0)
     except Exception, e:
         self.addLog('Parser::__init__', 'ERROR: (' + repr(e) + ')',
                     logErorr)
Ejemplo n.º 5
0
 def __init__(self, channelIdx, start, title, stop='', desc='', fullDesc='', categoryLang1='', categoryLang2='', directors='', actors='', date='', starrating=''):
     try:
         Base.__init__(self)
         self._channelIdx = channelIdx
         self._start = start
         self._stop = stop
         self._title = title
         self._desc = desc
         self._urlDesc = ''
         self._fullDesc = fullDesc
         self._categoryLang1 = categoryLang1
         self._categoryLang2 = categoryLang2
         self._directors = directors
         self._actors = actors
         self._date = date
         self._starrating = starrating
     except Exception, e:
         self.addLog('Programme::__init__', 'ERROR: (' + repr(e) + ')', logErorr)
Ejemplo n.º 6
0
 def __init__(self,
              index,
              orgName,
              userName='',
              icon='',
              correction=0,
              status=0,
              enable=0):
     try:
         Base.__init__(self)
         self._index = index
         self._orgName = orgName
         self._userName = userName
         self._icon = icon
         self._correction = correction
         # status : 0 - default; 1 - delete; 2 - new; 3 - update
         self._status = status
         self._enable = enable
     except Exception, e:
         self.addLog('Channel::__init__', 'ERROR: (' + repr(e) + ')',
                     logErorr)
Ejemplo n.º 7
0
 def __init__(self):
     try:
         Base.__init__(self)
         self._data = []
     except Exception, e:
         self.addLog('ProgrammeList::__init__', 'ERROR: (' + repr(e) + ')', logErorr)