How to use the build.kartinatv.src._ function in build

To help you get started, we’ve selected a few build examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github technic / iptvdream / build / kartinatv / src / plugin.py View on Github external
Screen.__init__(self, session)
		
		self["actions"] = NumberActionMap(["SetupActions", "ColorActions"],
		{
			"green": self.keySave,
			"red": self.keyCancel,
			"cancel": self.keyCancel
		}, -2)

		self["key_red"] = Button(_("Cancel"))
		self["key_green"] = Button(_("OK"))

		cfglist = [
			getConfigListEntry(_("login"), cfg.login),
			getConfigListEntry(_("password"), cfg.password),
			getConfigListEntry(_("Timeshift"), cfg.timeshift),
			getConfigListEntry(_("Show in mainmenu"), cfg.in_mainmenu), 
			getConfigListEntry(_("Use servicets instead of Gstreamer"), cfg.usesrvicets),
			getConfigListEntry(_("Buffering time, milliseconds"), config.plugins.KartinaTv.buftime)
		]
			
		ConfigListScreen.__init__(self, cfglist, session)
		self.setTitle(iName)
github technic / iptvdream / build / kartinatv / src / plugin.py View on Github external
def __init__(self, session):
		self.session = session
		Screen.__init__(self, session)
		
		self["actions"] = NumberActionMap(["SetupActions", "ColorActions"],
		{
			"green": self.keySave,
			"red": self.keyCancel,
			"cancel": self.keyCancel
		}, -2)

		self["key_red"] = Button(_("Cancel"))
		self["key_green"] = Button(_("OK"))

		cfglist = [
			getConfigListEntry(_("login"), cfg.login),
			getConfigListEntry(_("password"), cfg.password),
			getConfigListEntry(_("Timeshift"), cfg.timeshift),
			getConfigListEntry(_("Show in mainmenu"), cfg.in_mainmenu), 
			getConfigListEntry(_("Use servicets instead of Gstreamer"), cfg.usesrvicets),
			getConfigListEntry(_("Buffering time, milliseconds"), config.plugins.KartinaTv.buftime)
		]
			
		ConfigListScreen.__init__(self, cfglist, session)
		self.setTitle(iName)
github technic / iptvdream / build / kartinatv / src / plugin.py View on Github external
]
			
		ConfigListScreen.__init__(self, cfglist, session)
		self.setTitle(iName)
	
	def keySave(self):
		self.saveAll()
		self.close(True)
	
	def keyCancel(self):
		for x in self["config"].list:
			x[1].cancel()
		self.close(False)

#gettext HACK:
[_("Jan"), _("Feb"), _("Mar"), _("Apr"), _("May"), _("Jun"), _("Jul"), _("Aug"), _("Sep"), _("Oct"), _("Nov") ] 
[_("all"), _("favourites"), _("By group")]
github technic / iptvdream / build / kartinatv / src / plugin.py View on Github external
lst = []
		if bouquet.current.name != 'favourites':
			lst += [(_("Sort by name"), 1),
				   (_("Sort by default"), 2)]
		curr = bouquet.getCurrentSel()
		if curr and curr[1] == Bouquet.TYPE_SERVICE and config.ParentalControl.configured.value:
			cid = curr[0]
			if parentalControl.getProtectionLevel(fakeReference(cid).toCompareString()) == -1:
				lst += [( _("add to parental protection"), 'add')]
			else:
				lst += [( _("remove from parental protection"), 'rm')]
		if bouquet.current.name == 'favourites':
			if not self.editMode:
				lst += [( _("Enter edit mode"), 'start_edit')]
			else:
				lst += [( _("Exit edit mode"), 'stop_edit')]
		self.session.openWithCallback(self.showMenuCB, ChoiceBox, _("Context menu"), lst )
github technic / iptvdream / build / kartinatv / src / plugin.py View on Github external
def kartinaEpgEntry(self, entry):
		res = [
			(entry),
			(eListboxPythonMultiContent.TYPE_TEXT, 18, 2, 30, 22, 0, RT_HALIGN_LEFT, _(entry[0].strftime('%a')) ), 
			(eListboxPythonMultiContent.TYPE_TEXT, 50, 2, 90, 22, 0, RT_HALIGN_LEFT, entry[0].strftime('%H:%M')),
			(eListboxPythonMultiContent.TYPE_TEXT, 130, 2, 595, 24, 1, RT_HALIGN_LEFT, entry[1])]
		if ktv.channels[self.current].archive and entry[0] < syncTime():
			res += [(eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 0, 5, 16, 16, rec_png)]
		return res
github technic / iptvdream / build / kartinatv / src / plugin.py View on Github external
ConfigListScreen.__init__(self, cfglist, session)
		self.setTitle(iName)
	
	def keySave(self):
		self.saveAll()
		self.close(True)
	
	def keyCancel(self):
		for x in self["config"].list:
			x[1].cancel()
		self.close(False)

#gettext HACK:
[_("Jan"), _("Feb"), _("Mar"), _("Apr"), _("May"), _("Jun"), _("Jul"), _("Aug"), _("Sep"), _("Oct"), _("Nov") ] 
[_("all"), _("favourites"), _("By group")]
github technic / iptvdream / build / kartinatv / src / plugin.py View on Github external
def fillList(self):
		self.hideLabels("s%s")
		self.list.show()
		if self.epgDownloaded: return
		d = syncTime()+datetime.timedelta(self.day)
		try:
			epglist = ktv.getDayEpg(self.current, d)
		except:
			print "[KartinaTV] load day epg failed cid = ", self.current
			return
		self.list.setList(map(self.kartinaEpgEntry, epglist))
		self.setTitle("EPG / %s / %s %s" % (ktv.channels[self.current].name, d.strftime("%d"), _(d.strftime("%b")) ))
		x = 0
		for x in xrange(len(epglist)):
			if epglist[x][0] and (epglist[x][0] > syncTime()):
				break
		if x > 0: x-=1
		self.list.moveToIndex(x)
		self.epgDownloaded = True
		#self.ok()
github technic / iptvdream / build / kartinatv / src / plugin.py View on Github external
def __init__(self, session):
		self.session = session
		Screen.__init__(self, session)
		
		self["actions"] = NumberActionMap(["SetupActions", "ColorActions"],
		{
			"green": self.keySave,
			"red": self.keyCancel,
			"cancel": self.keyCancel
		}, -2)

		self["key_red"] = Button(_("Cancel"))
		self["key_green"] = Button(_("OK"))

		cfglist = [
			getConfigListEntry(_("login"), cfg.login),
			getConfigListEntry(_("password"), cfg.password),
			getConfigListEntry(_("Timeshift"), cfg.timeshift),
			getConfigListEntry(_("Show in mainmenu"), cfg.in_mainmenu), 
			getConfigListEntry(_("Use servicets instead of Gstreamer"), cfg.usesrvicets),
			getConfigListEntry(_("Buffering time, milliseconds"), config.plugins.KartinaTv.buftime)
		]
			
		ConfigListScreen.__init__(self, cfglist, session)
		self.setTitle(iName)
github technic / iptvdream / build / kartinatv / src / plugin.py View on Github external
def showMenu(self):
		lst = []
		if bouquet.current.name != 'favourites':
			lst += [(_("Sort by name"), 1),
				   (_("Sort by default"), 2)]
		curr = bouquet.getCurrentSel()
		if curr and curr[1] == Bouquet.TYPE_SERVICE and config.ParentalControl.configured.value:
			cid = curr[0]
			if parentalControl.getProtectionLevel(fakeReference(cid).toCompareString()) == -1:
				lst += [( _("add to parental protection"), 'add')]
			else:
				lst += [( _("remove from parental protection"), 'rm')]
		if bouquet.current.name == 'favourites':
			if not self.editMode:
				lst += [( _("Enter edit mode"), 'start_edit')]
			else:
				lst += [( _("Exit edit mode"), 'stop_edit')]
		self.session.openWithCallback(self.showMenuCB, ChoiceBox, _("Context menu"), lst )