nascar and f1

This commit is contained in:
Justin 2023-03-23 18:31:42 +08:00 committed by GitHub
parent e4727350c9
commit f4687fa02c
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') or (league == 'LIV'): if (league =='PGA') or (league == 'LPGA') or (league == 'PGA_EU') or (league == 'LIV') or (league == 'NASCAR') or (league == 'F1'):
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') or (league == 'LIV'): if (league == 'PGA') or (league == 'LPGA') or (league == 'PGA_EU') or (league == 'LIV') or (league == 'NASCAR') or (league == 'F1'):
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') or (league == 'LIV'): if (league == 'PGA') or (league == 'LPGA') or (league == 'PGA_EU') or (league == 'LIV') or (league == 'NASCAR') or (league == 'F1'):
event = match['event'] event = match['event']
venue = match['venue'] venue = match['venue']
city = match['city'] city = match['city']