예제 #1
0
	def checkShow(self, plugins):
		l = []
		for plugin in plugins:
			settings = getPlugin(plugin.id, Plugin.SETTINGS) #issue #455 => pass plugin.id instead of (localised) plugin.name
			show = True
			if settings is not None:
				settings = settings.fnc()
				for setting in settings:
					if setting[0] == "Show": #issue #455 => check for not localized string
						show = setting[1].value
			if show: 
				l.append(plugin)
		return l
예제 #2
0
			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"))
			
			if config.plugins.pvmc.showmovieandtvinmainmenu.value is True:
				list.append((_("Movies"),   getPlugin("movies", Plugin.MENU_VIDEOS),"", "50"))
				list.append((_("TV Shows"), getPlugin("tvshows", Plugin.MENU_VIDEOS), "", "50"))
			else:
				plugins = getPlugins(where=Plugin.MENU_VIDEOS)
				print plugins
				plugins = self.checkShow(plugins)
				print plugins
				if plugins is not None and len(plugins) == 1:
					list.append((_("Videos"), plugins[0], "menu_videos", "50"))
				elif plugins is not None and len(plugins) > 1:
					list.append((_("Videos"), plugins, "menu_videos", "50"))
			
			plugins = getPlugins(where=Plugin.MENU_WEATHER)
			plugins = self.checkShow(plugins)
			if plugins is not None and len(plugins) == 1:
				list.append((_("Weather"), plugins[0], "menu_weather", "50"))