[crossepg] r284 committed - Added MHW2 section in menu

24 views
Skip to first unread message

cros...@googlecode.com

unread,
Apr 29, 2011, 6:33:36 PM4/29/11
to cros...@googlegroups.com
Revision: 284
Author: san...@skanetwork.com
Date: Fri Apr 29 15:32:55 2011
Log: Added MHW2 section in menu
http://code.google.com/p/crossepg/source/detail?r=284

Modified:
/trunk/src/enigma2/python/crossepg_menu.py
/trunk/src/enigma2/python/crossepg_providers.py

=======================================
--- /trunk/src/enigma2/python/crossepg_menu.py Wed Apr 27 15:56:12 2011
+++ /trunk/src/enigma2/python/crossepg_menu.py Fri Apr 29 15:32:55 2011
@@ -59,6 +59,7 @@
l.append(self.buildListEntry(_("OpenTV providers"), "opentv.png"))
l.append(self.buildListEntry(_("XEPGDB providers"), "xepgdb.png"))
l.append(self.buildListEntry(_("Scripts providers"), "scripts.png"))
+ l.append(self.buildListEntry(_("MHW2 providers"), "opentv.png"))
l.append(self.buildListEntry(_("Providers start order"), "reorder.png"))
l.append(self.buildListEntry(_("Update rytec
providers"), "rytec_small.png"))
l.append(self.buildListEntry(_("Update xepgdb providers"), "xepgdb.png"))
@@ -108,24 +109,26 @@
elif index == 4:
self.session.open(CrossEPG_Providers, "script")
elif index == 5:
- self.session.open(CrossEPG_Ordering)
+ self.session.open(CrossEPG_Providers, "mhw2")
elif index == 6:
- self.session.open(CrossEPG_Rytec_Update)
+ self.session.open(CrossEPG_Ordering)
elif index == 7:
- self.session.open(CrossEPG_Xepgdb_Update)
+ self.session.open(CrossEPG_Rytec_Update)
elif index == 8:
+ self.session.open(CrossEPG_Xepgdb_Update)
+ elif index == 9:
self.config.load()
self.config.deleteLog()
self.downloader()
- elif index == 9:
- self.importer()
elif index == 10:
- self.converter()
+ self.importer()
elif index == 11:
- self.loader()
+ self.converter()
elif index == 12:
- self.session.open(CrossEPG_Info)
+ self.loader()
elif index == 13:
+ self.session.open(CrossEPG_Info)
+ elif index == 14:
self.session.open(CrossEPG_About)

def quit(self):
=======================================
--- /trunk/src/enigma2/python/crossepg_providers.py Sun Oct 31 06:00:50 2010
+++ /trunk/src/enigma2/python/crossepg_providers.py Fri Apr 29 15:32:55 2011
@@ -62,15 +62,30 @@
self.setTitle("CrossEPG - OpenTV providers")
elif self.protocol == "xepgdb":
self.setTitle("CrossEPG - XEPGDB providers")
- elif self.protocol == "scripts":
+ elif self.protocol == "script":
self.setTitle("CrossEPG - Scripts providers")
+ elif self.protocol == "mhw2":
+ self.setTitle("CrossEPG - MHW2 providers")

def buildList(self):
self.list = []
i = 0
+ protocol = self.protocol
+ if protocol == "mhw2":
+ protocol = "script"
+ print protocol
+ print self.protocol
for provider in self.providers[0]:
- if self.providers[2][i] == self.protocol:
- self.list.append(self.buildListEntry(provider, self.providers[1][i],
self.config.providers.count(provider) > 0))
+ if self.providers[2][i] == protocol:
+ if protocol == "script":
+ description = self.providers[1][i].lower()
+ # we use find("mhw2") as workaround because mhw2 doesn't exist as
provider type
+ if self.protocol == "mhw2" and description.find("mhw2") != -1:
+ self.list.append(self.buildListEntry(provider, self.providers[1][i],
self.config.providers.count(provider) > 0))
+ elif self.protocol == "script" and description.find("mhw2") == -1:
+ self.list.append(self.buildListEntry(provider, self.providers[1][i],
self.config.providers.count(provider) > 0))
+ else:
+ self.list.append(self.buildListEntry(provider, self.providers[1][i],
self.config.providers.count(provider) > 0))
i += 1

self["list"].setList(self.list)

Reply all
Reply to author
Forward
0 new messages