示例#1
0
	def communicatelApiProgressAndDuration(self, progress, duration):
		args = {}
		args["progress"] = progress
		args["duration"] = duration
		plugins = getPlugins(where=Plugin.INFO_PLAYBACK)
		for plugin in plugins:
			pluginSettingsList = plugin.fnc(args, self.flags)
示例#2
0
 def communicatelApiProgressAndDuration(self, progress, duration):
     args = {}
     args["progress"] = progress
     args["duration"] = duration
     plugins = getPlugins(where=Plugin.INFO_PLAYBACK)
     for plugin in plugins:
         pluginSettingsList = plugin.fnc(args, self.flags)
示例#3
0
 def notifyEntryStopped(self, flags):
     printl("", self, "D")
     args = {}
     args["status"] = "stopped"
     plugins = getPlugins(where=Plugin.INFO_PLAYBACK)
     for plugin in plugins:
         printl("plugin.name=" + str(plugin.name), self, "D")
         plugin.fnc(args, flags)
示例#4
0
 def notifyEntryPlaying(self, entry, flags):
     printl("", self, "D")
     args = self.buildInfoPlaybackArgs(entry)
     args["status"] = "playing"
     plugins = getPlugins(where=Plugin.INFO_PLAYBACK)
     for plugin in plugins:
         printl("plugin.name=" + str(plugin.name), self, "D")
         plugin.fnc(args, flags)
示例#5
0
 def notifyEntryStopped(self, flags):
     printl("", self, "D")
     args = {}
     args["status"] = "stopped"
     plugins = getPlugins(where=Plugin.INFO_PLAYBACK)
     for plugin in plugins:
         printl("plugin.name=" + str(plugin.name), self, "D")
         plugin.fnc(args, flags)
示例#6
0
 def notifyEntryPlaying(self, entry, flags):
     printl("", self, "D")
     args = self.buildInfoPlaybackArgs(entry)
     args["status"]  = "playing"
     plugins = getPlugins(where=Plugin.INFO_PLAYBACK)
     for plugin in plugins:
         printl("plugin.name=" + str(plugin.name), self, "D")
         plugin.fnc(args, flags)
	def onExecRunDev(self):
		printl("->", self, "H")
		plugins = getPlugins(where=Plugin.MENU_DEV)
		for s in plugins:
			if s.start is not None:
				self.session.open(s.start)
			elif s.fnc is not None:
				s.fnc(self.session)
		printl("<-", self, "H")
示例#8
0
def autostart(reason, **kwargs):
	#global gE2Control
	global gSessionPV
	
	if kwargs.has_key("session"):
		gSessionPV = kwargs["session"]
	printl(" Reason: %s - %s" % (str(reason), str(type(gSessionPV))), __name__, "H")
	
	if gSessionPV is not None:
		plugins = []
		if reason == 0: #Start
			printl("AUTOSTART_E2", __name__, "I")
			plugins = getPlugins(where=Plugin.AUTOSTART_E2)
		elif reason == 1: #Stop
			printl("STOP_E2", __name__, "I")
			plugins = getPlugins(where=Plugin.STOP_E2)
		
		for plugin in plugins:
			plugin.fnc(gSessionPV)
示例#9
0
def autostart(reason, **kwargs):
    #global gE2Control
    global gSessionPV

    if kwargs.has_key("session"):
        gSessionPV = kwargs["session"]
    printl(" Reason: %s - %s" % (str(reason), str(type(gSessionPV))), __name__,
           "H")

    if gSessionPV is not None:
        plugins = []
        if reason == 0:  #Start
            printl("AUTOSTART_E2", __name__, "I")
            plugins = getPlugins(where=Plugin.AUTOSTART_E2)
        elif reason == 1:  #Stop
            printl("STOP_E2", __name__, "I")
            plugins = getPlugins(where=Plugin.STOP_E2)

        for plugin in plugins:
            plugin.fnc(gSessionPV)
示例#10
0
	def runAutostartDelayed(self):
		printl("->", self, "H")
		
		self.delayedTimer.stop()
		
		plugins = getPlugins(where=Plugin.AUTOSTART_DELAYED)
		for p in plugins:
			if p.start is not None:
				self.session.open(p.start)
			elif p.fnc is not None:
				p.fnc(self.session)
		
		printl("<-", self, "H")
示例#11
0
def getNextWakeup():
    printl("->", __name__, "I")
    from Plugins.Extensions.ProjectValerie.__plugin__ import getPlugin, getPlugins, Plugin

    nexWakeup = -1
    plugins = getPlugins(Plugin.WAKEUP)
    for plugin in plugins:
        wakeup = plugin.fnc()
        if wakeup > 0 and nexWakeup <= 0:
            nexWakeup = wakeup
        elif wakeup > 0 and nexWakeup > wakeup:
            nexWakeup = wakeup

    return nexWakeup
示例#12
0
def getNextWakeup():
	printl("->", __name__, "I")
	from Plugins.Extensions.ProjectValerie.__plugin__ import getPlugin, getPlugins, Plugin
	
	nexWakeup = -1
	plugins = getPlugins(Plugin.WAKEUP)
	for plugin in plugins:
		wakeup = plugin.fnc()
		if wakeup > 0 and nexWakeup <= 0:
			nexWakeup = wakeup
		elif wakeup > 0 and nexWakeup > wakeup:
			nexWakeup = wakeup
	
	return nexWakeup
示例#13
0
	def initConfigList(self, element=None):
		printl("->", self, "S")
		try:
			self.list = []
			plugins = getPlugins(where=Plugin.SETTINGS)
			for plugin in plugins:
				pluginSettingsList = plugin.fnc()
				for pluginSetting in pluginSettingsList:
					if len(plugin.name) > 0:
						text = "[%s] %s" % (plugin.desc, pluginSetting[0], )
					else:
						text = "%s" % (pluginSetting[0], )
					self.list.append(getConfigListEntry(text, pluginSetting[1]))
			
			self["config"].setList(self.list)
		except Exception, ex:
			printl("Exception(" + str(type(ex)) + "): " + str(ex), self, "E")
示例#14
0
	def getData(self, type, param=None):
		global Manager
		if Manager is None:
			from Plugins.Extensions.ProjectValerie.DMC_Plugins.DMC_SyncExtras.Manager import Manager
		
		global ManagerInstance
		if ManagerInstance is None:
			ManagerInstance = Manager("WebIf:WebData")
		
		dataRows = []
		
		printl("TYPE: " + type)
		if type == "movies":
			dataRows = ManagerInstance.getMoviesValues()
		elif type == "tvshows":
			dataRows = ManagerInstance.getSeriesValues()
		elif type == "episodes":
			if param != None:
				dataRows = ManagerInstance.getEpisodesWithTheTvDbId(param)
			else:
				dataRows = ManagerInstance.getEpisodes()
		elif type == "EpisodesOfSerie":
			dataRows = ManagerInstance.getEpisodes(param)	
		elif type == "failed":
			dataRows = ManagerInstance.getFailedValues()

		elif type == "MediaInfo_isMovie":
			dataRows = ManagerInstance.getMedia(param)
		elif type == "MediaInfo_isTvShow":
			dataRows = ManagerInstance.getMedia(param)
		elif type == "MediaInfo_isEpisode":
			dataRows = ManagerInstance.getMedia(param)
		elif type == "MediaInfo_isFailed":
			dataRows = ManagerInstance.getMedia(param)
		elif type == "MediaInfo_isSeen":
			userId = config.plugins.pvmc.seenuserid.value
			dataRows = ManagerInstance.isMediaSeen(param, userId)
		elif type == "MediaInfo_markSeen":
			userId = config.plugins.pvmc.seenuserid.value
			dataRows = ManagerInstance.MarkAsSeen(param, userId)
		elif type == "MediaInfo_markUnseen":
			userId = config.plugins.pvmc.seenuserid.value
			dataRows = ManagerInstance.MarkAsUnseen(param, userId)
			
		elif type == "options.global":
			from Plugins.Extensions.ProjectValerie.__plugin__ import getPlugins, Plugin
			dataRows = []
			plugins = getPlugins(where=Plugin.SETTINGS)
			for plugin in plugins: 
				pluginSettingsList = plugin.fnc() 
				for pluginSetting in pluginSettingsList: 
					if len(plugin.name) > 0:
						text = "[%s] %s" % (plugin.name, pluginSetting[0], )
					else:
						text = "%s" % (pluginSetting[0], )
					dataRows.append((text, pluginSetting[1]))
		elif type == "options.sync":
			from Plugins.Extensions.ProjectValerie.DMC_Plugins.DMC_SyncExtras.PathsConfig import PathsConfig
			dataRows = PathsConfig().getInstance()
		
		return dataRows
示例#15
0
			self.Watch = False
		elif self.APILevel == 2:
			list = []
			list.append((_("Settings"), "PVMC_Settings", "menu_settings", "50"))
			list.append((_("Synchronize"), "PVMC_Sync",     "menu_sync", "50"))
			list.append((_("Live TV"),  "InfoBar",       "menu_tv", "50"))
			list.append((_("Movies"),   "PVMC_Movies",   "menu_movies", "50"))
			list.append((_("TV Shows"), "PVMC_Series",   "menu_series", "50"))
			
			self["menu"] = List(list, True)
			
			self["version"] = Label(config.plugins.pvmc.version.value)
		
		elif self.APILevel >= 3:
			list = []
			plugins = getPlugins(where=Plugin.MENU_PICTURES)
			plugins = self.checkShow(plugins)
			if plugins is not None and len(plugins) == 1:
				list.append((_("Pictures"), plugins[0], "menu_pictures", "50"))
			elif plugins is not None and len(plugins) > 1:
				list.append((_("Pictures"), plugins, "menu_pictures", "50"))
			
			plugins = getPlugins(where=Plugin.MENU_MUSIC)
			plugins = self.checkShow(plugins)
			if plugins is not None and len(plugins) == 1:
				list.append((_("Music"), plugins[0], "menu_music", "50"))
			elif plugins is not None and len(plugins) > 1:
				list.append((_("Music"), plugins, "menu_music", "50"))
			
			list.append((_("Live TV"),  "InfoBar", "menu_tv", "50"))