1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

subtitle.wrst: add translation of names to hex

fixes: #963
This commit is contained in:
Johan Andersson 2018-10-28 20:47:41 +01:00
parent 647d119ce8
commit 4fbf861985

View File

@ -240,8 +240,12 @@ class subtitle(object):
subnr = True subnr = True
else: else:
if self.config.get("convert_subtitle_colors"): if self.config.get("convert_subtitle_colors"):
colors = {'30': '#000000', '31': '#ff0000', '32': '#00ff00', '33': '#ffff00', colors = {
'34': '#0000ff', '35': '#ff00ff', '36': '#00ffff', '37': '#ffffff'} '30': '#000000', '31': '#ff0000', '32': '#00ff00', '33': '#ffff00', '34': '#0000ff',
'35': '#ff00ff', '36': '#00ffff', '37': '#ffffff', 'c.black': '#000000', 'c.red': '#ff0000',
'c.green': '#00ff00', 'c.yellow': '#ffff00', 'c.blue': '#0000ff', 'c.magneta': '#ff00ff',
'c.cyan': '#00ffff', 'c.gray': '#ffffff',
}
sub = i sub = i
for tag, color in colors.items(): for tag, color in colors.items():
regex1 = '<' + tag + '>' regex1 = '<' + tag + '>'