Skip to content

Commit

Permalink
[Fixed] Some converters that fail in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitarCC committed Oct 15, 2024
1 parent 401204b commit f37a841
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/python/Components/Converter/ServiceInfo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from Components.Converter.Converter import Converter
from enigma import iServiceInformation, iPlayableService
from enigma import iServiceInformation, iPlayableService, eServiceReference
from Screens.InfoBarGenerics import hasActiveSubservicesForCurrentChannel
from Components.Element import cached

Expand Down Expand Up @@ -153,7 +153,8 @@ def getServiceInfoString(self, info, what, convert=lambda x: "%d" % x):
@cached
def getBoolean(self):
service = self.source.service
info = service and service.info()
isRef = isinstance(service, eServiceReference)
info = service.info() if (service and not isRef) else None
if info:
if self.type == self.HAS_TELETEXT:
tpid = info.getInfo(iServiceInformation.sTXTPID)
Expand Down
5 changes: 3 additions & 2 deletions lib/python/Components/Renderer/VideoSize.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from Components.VariableText import VariableText
from enigma import eLabel, iServiceInformation
from enigma import eLabel, iServiceInformation, eServiceReference
from Components.Renderer.Renderer import Renderer

#
Expand All @@ -16,7 +16,8 @@ def __init__(self):

def changed(self, what):
service = self.source.service
info = service and service.info()
isRef = isinstance(service, eServiceReference)
info = service.info() if (service and not isRef) else None
if info is None:
self.text = ""
return
Expand Down

0 comments on commit f37a841

Please sign in to comment.