Skip to content

Commit

Permalink
[Picon] SNP, change priority
Browse files Browse the repository at this point in the history
  • Loading branch information
Huevos committed Nov 17, 2024
1 parent da03e74 commit ebe467d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/python/Components/Renderer/Picon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit ebe467d

Please sign in to comment.