This commit is contained in:
Justin 2023-03-23 16:37:07 +08:00 committed by GitHub
parent 02daa21adc
commit eb62a7b7b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2520,7 +2520,7 @@ class StockTicker():
for league in leagues: for league in leagues:
try: try:
x_offset = 0 x_offset = 0
if (league =='PGA') or (league == 'LPGA') or (league == 'PGA_EU'): if (league =='PGA') or (league == 'LPGA') or (league == 'PGA_EU') or (league == 'LIV'):
img = Image.new('RGB', (10000, 32)) img = Image.new('RGB', (10000, 32))
else: else:
img = Image.new('RGB', (10000, 32)) img = Image.new('RGB', (10000, 32))
@ -2529,7 +2529,7 @@ class StockTicker():
try: try:
league_logo = Image.open('logos/sports/league_logos/{}.png'.format(league)).convert('RGB') league_logo = Image.open('logos/sports/league_logos/{}.png'.format(league)).convert('RGB')
if (league == 'PGA') or (league == 'LPGA') or (league == 'PGA_EU'): if (league == 'PGA') or (league == 'LPGA') or (league == 'PGA_EU') or (league == 'LIV'):
x_offset += self.blank.size[0] x_offset += self.blank.size[0]
else: else:
img.paste(league_logo, (x_offset,0)) img.paste(league_logo, (x_offset,0))
@ -2554,7 +2554,7 @@ class StockTicker():
dateEvent = match['date'].replace('-', '.') dateEvent = match['date'].replace('-', '.')
date_timage = self.textImage(dateEvent, small_font, r=255, g=255, b=255) date_timage = self.textImage(dateEvent, small_font, r=255, g=255, b=255)
if (league == 'PGA') or (league == 'LPGA') or (league == 'PGA_EU'): if (league == 'PGA') or (league == 'LPGA') or (league == 'PGA_EU') or (league == 'LIV'):
event = match['event'] event = match['event']
venue = match['venue'] venue = match['venue']
city = match['city'] city = match['city']
@ -3193,7 +3193,7 @@ class StockTicker():
width, height = league_logo.size width, height = league_logo.size
league_logo2 = league_logo.resize((int(width/2), int(height/2))) league_logo2 = league_logo.resize((int(width/2), int(height/2)))
if (league == 'PGA') or (league == 'LPGA') or (league == 'PGA_EU'): if (league == 'PGA') or (league == 'LPGA') or (league == 'PGA_EU') or (league == 'LIV'):
x_offset += 10 x_offset += 10
else: else:
img.paste(league_logo2, (x_offset,0)) img.paste(league_logo2, (x_offset,0))
@ -3218,7 +3218,7 @@ class StockTicker():
dateEvent = match['date'].replace('-', '.') dateEvent = match['date'].replace('-', '.')
date_timage = self.textImage(dateEvent, small_font, r = 255, g = 255, b = 255) date_timage = self.textImage(dateEvent, small_font, r = 255, g = 255, b = 255)
if (league == 'PGA') or (league == 'LPGA') or (league == 'PGA_EU'): if (league == 'PGA') or (league == 'LPGA') or (league == 'PGA_EU') or (league == 'LIV'):
event = match['event'] event = match['event']
venue = match['venue'] venue = match['venue']
city = match['city'] city = match['city']