Skip to content

Commit

Permalink
oprava farbickovania textu pre OpenPLi 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjet18 committed Dec 2, 2021
1 parent f8b5fbd commit 80de88f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions build/plugin/src/converter/ACZSKKodiToE2List.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
from Components.Converter.Converter import Converter
from Components.Element import cached

colorFixNeeded = True # old behaviour as default

try:
from Tools.Hex2strColor import Hex2strColor
if Hex2strColor(0xffffffff) == "\c????????":
colorFixNeeded = True
else:
colorFixNeeded = False
except:
pass


def getEscapeColorFromHexString(color):
if color.startswith('#'):
color = color[1:]
Expand All @@ -10,6 +22,8 @@ def getEscapeColorFromHexString(color):
if len(color) != 8:
print 'invalid color %s'
return getEscapeColorFromHexString("00ffffff")
if colorFixNeeded == False:
return color
colorsarray = []
for x in color:
if x == "0":
Expand Down

0 comments on commit 80de88f

Please sign in to comment.