コード例 #1
0
    def gotResult(self, msg):
        logDebug("SP: Main: Thread: gotResult:", msg)
        callback, data = msg
        if callable(callback):
            callback(data)

        if (config.plugins.seriesplugin.lookup_counter.value == 10) \
         or (config.plugins.seriesplugin.lookup_counter.value == 100) \
         or (config.plugins.seriesplugin.lookup_counter.value % 1000 == 0):
            from plugin import ABOUT
            about = ABOUT.format(
                **
                {'lookups': config.plugins.seriesplugin.lookup_counter.value})
            AddPopup(about, MessageBox.TYPE_INFO, -1, 'SP_PopUp_ID_About')
コード例 #2
0
    def gotResult(self, msg):
        log.debug(" Main: Thread: gotResult:", msg)
        callback, data = msg
        if callable(callback):
            callback(data)

        if (
            (config.plugins.seriesplugin.lookup_counter.value == 10)
            or (config.plugins.seriesplugin.lookup_counter.value == 100)
            or (config.plugins.seriesplugin.lookup_counter.value % 1000 == 0)
        ):
            from plugin import ABOUT

            about = ABOUT.format(**{"lookups": config.plugins.seriesplugin.lookup_counter.value})
            AddPopup(about, MessageBox.TYPE_INFO, -1, "SP_PopUp_ID_About")
コード例 #3
0
	def parseCutlist(self, data):
		try:
			if data:
				print "Cutlist downloaded."
				
				# Read cut information from cutlist file
				segments = self.readCuts(data)   # Returns seconds
				cut_list = self.convertToPTS(segments)
				
				if cut_list:
					
					
					# Increment counter and show popup
					from Components.config import config
					config.plugins.cutlistdownloader.download_counter.value += 1
					if (config.plugins.cutlistdownloader.download_counter.value == 10) \
						or (config.plugins.cutlistdownloader.download_counter.value == 100) \
						or (config.plugins.cutlistdownloader.download_counter.value % 1000 == 0):
						from plugin import ABOUT
						from Screens.MessageBox import MessageBox
						from Tools.Notifications import AddPopup
						about = ABOUT.format( **{'downloads': config.plugins.cutlistdownloader.download_counter.value} )
						AddPopup(
							about,
							MessageBox.TYPE_INFO,
							0,
							'CD_PopUp_ID_About'
						)
					
					
					if not self.cancelled and callable(self.callback):
						self.cut_list = cut_list
						self.callback(cut_list)
					self.callback = None
				else:
					self.downloadCutlist()
			else:
				self.downloadCutlist()
		except Exception, e:
			print "[CUTS] parseCutlist exception: " + str(e)
コード例 #4
0
	def close(self):
		from plugin import ABOUT
		about = ABOUT.format( **{'lookups': config.plugins.seriesplugin.lookup_counter.value} )
		self.session.openWithCallback(self.closeConfirm, MessageBox, about, MessageBox.TYPE_INFO)
コード例 #5
0
	def close(self):
		from plugin import ABOUT
		about = ABOUT.format( **{'lookups': config.plugins.seriesplugin.lookup_counter.value} )
		self.session.openWithCallback(self.closeConfirm, MessageBox, about, MessageBox.TYPE_INFO)