Skip to content

Commit

Permalink
Merge pull request #4101 from Huevos/utf8-picon-patch
Browse files Browse the repository at this point in the history
  • Loading branch information
littlesat authored Nov 14, 2024
2 parents e85ee87 + c870017 commit 6f33a40
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/python/Components/Renderer/Picon.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ def getPiconName(serviceRef):
pngname = findPicon('_'.join(fields))
if not pngname: # picon by channel name
utf8_name = sanitizeFilename(ServiceReference(serviceRef).getServiceName()).lower()
name = re.sub("[^a-z0-9]", "", utf8_name.replace("&", "and").replace("+", "plus").replace("*", "star"))
if name:
pngname = findPicon(name) or findPicon(re.sub("(fhd|uhd|hd|sd|4k)$", "", name).strip()) or findPicon(utf8_name)
pngname = findPicon(utf8_name) or findPicon(re.sub(r"(fhd|uhd|hd|sd|4k)$", "", utf8_name).strip())
if not pngname: # legacy ascii service name picons
name = re.sub("[^a-z0-9]", "", utf8_name.replace("&", "and").replace("+", "plus").replace("*", "star"))
pngname = findPicon(name) or findPicon(re.sub(r"(fhd|uhd|hd|sd|4k)$", "", name).strip())
if not pngname and len(name) > 6:
series = re.sub(r"s[0-9]*e[0-9]*$", "", name)
pngname = findPicon(series)
Expand Down

0 comments on commit 6f33a40

Please sign in to comment.