Skip to content

Commit

Permalink
oops wrong getNumber code...Now correct one
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitarCC committed Oct 18, 2023
1 parent 6c5d8e9 commit 3481845
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions lib/python/Components/Converter/ServiceName.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from enigma import iServiceInformation, iPlayableService, iPlayableServicePtr, eServiceReference
from ServiceReference import resolveAlternate
from Components.Element import cached
from Tools.General import getServiceNum


class ServiceName(Converter):
Expand Down Expand Up @@ -89,14 +88,14 @@ def getName(self, ref, info):
return name.replace('\xc2\x86', '').replace('\xc2\x87', '').replace('_', ' ')

def getNumber(self, ref, info):
from Screens.InfoBar import InfoBar
channelSelectionServicelist = InfoBar.instance and InfoBar.instance.servicelist
channelnum = ''
ref = ref or eServiceReference(info.getInfoString(iServiceInformation.sServiceref))
if channelSelectionServicelist and channelSelectionServicelist.inBouquet():
myRoot = channelSelectionServicelist.getRoot()
channelnum = getServiceNum(ref, myRoot)
return channelnum
if not ref:
ref = eServiceReference(info.getInfoString(iServiceInformation.sServiceref))
num = ref and ref.getChannelNum() or None
if num is None:
num = '---'
else:
num = str(num)
return num

def getProvider(self, ref, info):
if ref:
Expand Down

0 comments on commit 3481845

Please sign in to comment.