Package: enigma2-plugin-extensions-epgrefresh
-Version: 0.1.0-20080603-r0
+Version: 0.2.0-20090123-r0
Description: Plugin to refresh EPG Data when Reciever is inactive
Architecture: mipsel
Section: extra
Priority: optional
Maintainer: Moritz Venn <moritz.venn@freaque.net>
Homepage: http://www.ritzmo.de
-Depends: enigma2(>=2.5cvs20080416)
+Depends: enigma2(>=2.6git20090120)
Source: http://enigma2-plugins.schwerkraft.elitedvb.net/
# Show ServiceName instead of ServiceReference
from ServiceReference import ServiceReference
-# This is a modified ConfigSelection which does not require the
-# choices to be strings...
-class ConfigDummy(ConfigSelection):
- def setChoices(self, choices, default = None):
- self.choices = []
- self.description = {}
-
- if isinstance(choices, list):
- for x in choices:
- if isinstance(x, tuple):
- self.choices.append(x[0])
- self.description[x[0]] = x[1]
- else:
- self.choices.append(x)
- self.description[x] = x
- else:
- assert False, "ConfigDummy choices must be a list!"
-
- if len(self.choices) == 0:
- self.choices = [""]
- self.description[""] = ""
-
- if default is None:
- default = self.choices[0]
-
- assert default in self.choices, "default must be in choice list, but " + repr(default) + " is not!"
- self.default = default
-
- if self.value == None or not self.value in self.choices:
- self.value = default
-
class SimpleBouquetSelection(SimpleChannelSelection):
def __init__(self, session, title):
SimpleChannelSelection.__init__(self, session, title)
services[1][:]
)
- self.typeSelection = ConfigDummy(choices = [("channels", _("Channels")), ("bouquets", _("Bouquets"))])
+ self.typeSelection = ConfigSelection(choices = [("channels", _("Channels")), ("bouquets", _("Bouquets"))])
self.typeSelection.addNotifier(self.refresh, initial_call = False)
self.reloadList()
self.idx = 1
self.list.extend([
- getConfigListEntry(_("Refreshing"), ConfigDummy(choices = [(x, ServiceReference(x.sref).getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', ''))]))
+ getConfigListEntry(_("Refreshing"), ConfigSelection(choices = [(x, ServiceReference(x.sref).getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', ''))]))
for x in self.services[self.idx]
])
list = self["config"].getList()
list.append(getConfigListEntry(
_("Refreshing"),
- ConfigDummy(choices = [(
+ ConfigSelection(choices = [(
EPGRefreshService(args[0].toString(), None),
ServiceReference(args[0]).getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', '')
)])