Ignore:
Timestamp:
Dec 7, 2011, 11:58:44 AM (14 years ago)
Author:
madie
Message:

[ipk] update crossepg

Location:
ipk/source.sh4/swapepg_crossepg
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • ipk/source.sh4/swapepg_crossepg/var/swap/extensions/CrossEPG/crossepg_providers.py

    r7451 r12090  
    6363                elif self.protocol == "xepgdb":
    6464                        self.setTitle("CrossEPG - XEPGDB providers")
    65                 elif self.protocol == "scripts":
     65                elif self.protocol == "script":
    6666                        self.setTitle("CrossEPG - Scripts providers")
     67                elif self.protocol == "mhw2":
     68                        self.setTitle("CrossEPG - MHW2 providers")
    6769
    6870        def buildList(self):
    6971                self.list = []
    7072                i = 0
     73                protocol = self.protocol
     74                if protocol == "mhw2":
     75                        protocol = "script"
     76                print protocol
     77                print self.protocol
    7178                for provider in self.providers[0]:
    72                         if self.providers[2][i] == self.protocol:
    73                                 self.list.append(self.buildListEntry(provider, self.providers[1][i], self.config.providers.count(provider) > 0))
     79                        if self.providers[2][i] == protocol:
     80                                if protocol == "script":
     81                                        description = self.providers[1][i].lower()
     82                                        # we use find("mhw2") as workaround because mhw2 doesn't exist as provider type
     83                                        if self.protocol == "mhw2" and description.find("mhw2") != -1:
     84                                                self.list.append(self.buildListEntry(provider, self.providers[1][i], self.config.providers.count(provider) > 0))
     85                                        elif self.protocol == "script" and description.find("mhw2") == -1:
     86                                                self.list.append(self.buildListEntry(provider, self.providers[1][i], self.config.providers.count(provider) > 0))
     87                                else:
     88                                        self.list.append(self.buildListEntry(provider, self.providers[1][i], self.config.providers.count(provider) > 0))
    7489                        i += 1
    7590
Note: See TracChangeset for help on using the changeset viewer.