def beginImport(self, longDescUntil = None):
		global HDD_EPG_DAT
		'Starts importing using Enigma reactor. Set self.sources before calling this.'
		HDD_EPG_DAT = config.misc.epgcache_filename.value
		if config.plugins.epgimport.clear_oldepg.value and hasattr(self.epgcache, 'flushEPG'):
			try:
				os.system("rm -f %s" % (config.misc.epgcache_filename.value))
				os.system("rm -f %s.backup" % (config.misc.epgcache_filename.value))
				self.epgcache.flushEPG()
			except:
				pass
		if hasattr(self.epgcache, 'importEvents'):
			self.storage = self.epgcache
		elif hasattr(self.epgcache, 'importEvent'):
			self.storage = OudeisImporter(self.epgcache)
		else:
			print "[EPGImport] oudeis patch not detected, using epg.dat instead."
			import epgdat_importer
			self.storage = epgdat_importer.epgdatclass()
		self.eventCount = 0
		if longDescUntil is None:
			# default to 7 days ahead
			self.longDescUntil = time.time() + 24*3600*7
		else:
			self.longDescUntil = longDescUntil;
		self.nextImport()
Example #2
0
    def beginImport(self, longDescUntil = None):
    	'Starts importing using Enigma reactor. Set self.sources before calling this.'
      	if hasattr(self.epgcache, 'importEvents'):
      	    self.storage = self.epgcache
      	elif hasattr(self.epgcache, 'importEvent'):
            self.storage = OudeisImporter(self.epgcache)             
      	else:
            print "[EPGImport] oudeis patch not detected, using epg.dat instead."
            import epgdat_importer
            self.storage = epgdat_importer.epgdatclass()
	self.eventCount = 0
	if longDescUntil is None:
            # default to 7 days ahead
            self.longDescUntil = time.time() + 24*3600*7
	else:
            self.longDescUntil = longDescUntil;
        self.nextImport()
 def beginImport(self, longDescUntil=None):
     'Starts importing using Enigma reactor. Set self.sources before calling this.'
     if hasattr(self.epgcache, 'importEvents'):
         self.storage = self.epgcache
     elif hasattr(self.epgcache, 'importEvent'):
         self.storage = OudeisImporter(self.epgcache)
     else:
         print "[EPGImport] oudeis patch not detected, using epg.dat instead."
         import epgdat_importer
         self.storage = epgdat_importer.epgdatclass()
     self.eventCount = 0
     if longDescUntil is None:
         # default to 7 days ahead
         self.longDescUntil = time.time() + 24 * 3600 * 7
     else:
         self.longDescUntil = longDescUntil
     self.nextImport()