Skip to content

Commit

Permalink
[ServiceList]
Browse files Browse the repository at this point in the history
* improve service number handling
  • Loading branch information
jbleyel committed Sep 13, 2024
1 parent 5ff7f22 commit a2b5147
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/python/Components/ServiceList.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ def parseTemplateModes(template):

items = []
if modeName == "services":
if config.channelSelection.showNumber.value and config.usage.numberMode != 2:
excludeItemIndexes.append("Number")
if subMode:
continue
else:
Expand Down Expand Up @@ -1285,12 +1287,12 @@ def getColor(defaults, attributes, serviceAvail, marked):
maxEvents = defaults.get("maxevents")
if not isMarker and maxEvents:
events = eEPGCache.getInstance().lookupEvent(["BDTS%d" % maxEvents, (service.toString(), 0, -1, 360)])
serviceNumber = str(service.getChannelNum())
serviceNumber = service.getChannelNum()
elif self.mode == self.MODE_SERVICES:
events = eEPGCache.getInstance().lookupEvent(["BDTS1", (service.toString(), 0, -1, 360)])
defaults = self.templateDefaultsServices
templateItems = self.templateDataServices
serviceNumber = str(service.getChannelNum())
serviceNumber = service.getChannelNum()
else:
defaults = self.templateDefaultsOther
if isMarker:
Expand Down Expand Up @@ -1355,7 +1357,7 @@ def getColor(defaults, attributes, serviceAvail, marked):
foregroundColorRecord, foregroundColorSelected = getRecordColors(foregroundColor, foregroundColorSelected, status, defaults, item)

if itemIndex == 0 and serviceNumber: # Number
res.append((MultiContentEntryText(pos=pos, size=size, font=font, flags=flags, text=serviceNumber, color=foregroundColorRecord, color_sel=foregroundColorSelected, backcolor=backgroundColor, backcolor_sel=backgroundColorSelected)))
res.append((MultiContentEntryText(pos=pos, size=size, font=font, flags=flags, text=str(serviceNumber), color=foregroundColorRecord, color_sel=foregroundColorSelected, backcolor=backgroundColor, backcolor_sel=backgroundColorSelected)))
if itemIndex == 1 and serviceName: # ServiceName
res.append((MultiContentEntryText(pos=pos, size=size, font=font, flags=flags, text=serviceName, color=foregroundColorRecord, color_sel=foregroundColorSelected, backcolor=backgroundColor, backcolor_sel=backgroundColorSelected)))

Expand Down

0 comments on commit a2b5147

Please sign in to comment.