diff --git a/lib/python/Components/Renderer/Picon.py b/lib/python/Components/Renderer/Picon.py index d00e884f9c..a4ea5f6950 100644 --- a/lib/python/Components/Renderer/Picon.py +++ b/lib/python/Components/Renderer/Picon.py @@ -90,10 +90,9 @@ def getPiconName(self, serviceRef): pngname = self.findPicon("_".join(fields)) if not pngname: # picon by channel name utf8_name = sanitizeFilename(eServiceReference(serviceRef).getServiceName()).lower() - pngname = self.findPicon(utf8_name) or self.findPicon(sub(r"(fhd|uhd|hd|sd|4k)$", "", utf8_name).strip()) - if not pngname: # legacy ascii service name picons - name = sub("[^a-z0-9]", "", utf8_name.replace("&", "and").replace("+", "plus").replace("*", "star")) - pngname = self.findPicon(name) or self.findPicon(sub(r"(fhd|uhd|hd|sd|4k)$", "", name).strip()) + legacy_name = sub("[^a-z0-9]", "", utf8_name.replace("&", "and").replace("+", "plus").replace("*", "star")) # legacy ascii service name picons + if utf8_name: + pngname = self.findPicon(utf8_name) or legacy_name and self.findPicon(legacy_name) or self.findPicon(sub(r"(fhd|uhd|hd|sd|4k)$", "", utf8_name).strip()) or legacy_name and self.findPicon(sub(r"(fhd|uhd|hd|sd|4k)$", "", legacy_name).strip()) return pngname