liv golf prof

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

View File

@ -2561,9 +2561,14 @@ class StockTicker():
country = match['country'] country = match['country']
season = match['season'] season = match['season']
if time != 'future': if (time != 'future') and (league != 'LIV'):
golf_standings1 = match['golf_standings'][::2] golf_standings1 = match['golf_standings'][::2]
golf_standings2 = match['golf_standings'][1::2] golf_standings2 = match['golf_standings'][1::2]
elif (time!= 'future') and (league == 'LIV'):
golf_standings1 = match['golf_standings'][0][::2]
golf_standings2 = match['golf_standings'][0][1::2]
golf_standings1_teams = match['golf_standings'][1][::2]
golf_standings2_teams = match['golf_standings'][1][1::2]
img.paste(league_logo, (x_offset, 0)) img.paste(league_logo, (x_offset, 0))
x_offset += league_logo.size[0] + 2 x_offset += league_logo.size[0] + 2
@ -2637,6 +2642,28 @@ class StockTicker():
img.paste(golf_standings2_timage, (x_offset2 + symbol2_timage.size[0] + 7, 20)) img.paste(golf_standings2_timage, (x_offset2 + symbol2_timage.size[0] + 7, 20))
x_offset2 += (golf_standings2_timage.size[0] + symbol2_timage.size[0] + 7) x_offset2 += (golf_standings2_timage.size[0] + symbol2_timage.size[0] + 7)
if league == 'LIV':
if x_offset >= x_offset2:
x_offset += 10
x_offset2 = x_offset
else:
x_offset2 += 10
x_offset = x_offset2
for each_team in golf_standings1_teams:
symbol1_timage = self.textImage('|', small_font, r=0, g=255, b=0)
img.paste(symbol1_timage, (x_offset + 5, 7))
golf_standings1_timage = self.textImage(each_team, small_font, r=255, g=255, b=255)
img.paste(golf_standings1_timage, (x_offset + symbol1_timage.size[0] + 7, 7))
x_offset += (golf_standings1_timage.size[0] + symbol1_timage.size[0] + 7)
for each_team2 in golf_standings2_teams:
symbol2_timage = self.textImage('|', small_font, r=0, g=255, b=0)
img.paste(symbol2_timage, (x_offset2 + 5, 20))
golf_standings2_timage = self.textImage(each_team2, small_font, r=255, g=255, b=255)
img.paste(golf_standings2_timage, (x_offset2 + symbol2_timage.size[0] + 7, 20))
x_offset2 += (golf_standings2_timage.size[0] + symbol2_timage.size[0] + 7)
if x_offset >= x_offset2: if x_offset >= x_offset2:
x_offset += buff_size x_offset += buff_size
else: else:
@ -3225,9 +3252,14 @@ class StockTicker():
country = match['country'] country = match['country']
season = match['season'] season = match['season']
if time != 'future': if (time != 'future') and (league != 'LIV'):
golf_standings1 = match['golf_standings'][::2] golf_standings1 = match['golf_standings'][::2]
golf_standings2 = match['golf_standings'][1::2] golf_standings2 = match['golf_standings'][1::2]
elif (time!= 'future') and (league == 'LIV'):
golf_standings1 = match['golf_standings'][0][::2]
golf_standings2 = match['golf_standings'][0][1::2]
golf_standings1_teams = match['golf_standings'][1][::2]
golf_standings2_teams = match['golf_standings'][1][1::2]
img.paste(league_logo2, (x_offset, 0)) img.paste(league_logo2, (x_offset, 0))
x_offset += league_logo2.size[0] + 5 x_offset += league_logo2.size[0] + 5
@ -3302,6 +3334,28 @@ class StockTicker():
img.paste(golf_standings2_timage, (x_offset2 + symbol2_timage.size[0] + 7, 9)) img.paste(golf_standings2_timage, (x_offset2 + symbol2_timage.size[0] + 7, 9))
x_offset2 += (golf_standings2_timage.size[0] + symbol2_timage.size[0] + 7) x_offset2 += (golf_standings2_timage.size[0] + symbol2_timage.size[0] + 7)
if league == 'LIV':
if x_offset >= x_offset2:
x_offset += 5
x_offset2 = x_offset
else:
x_offset2 += 5
x_offset = x_offset2
for each_team in golf_standings1_teams:
symbol1_timage = self.textImage('|', small_font, r=0, g=255, b=0)
img.paste(symbol1_timage, (x_offset + 5, 1))
golf_standings1_timage = self.textImage(each_team, small_font, r=255, g=255, b=255)
img.paste(golf_standings1_timage, (x_offset + symbol1_timage.size[0] + 7, 1))
x_offset += (golf_standings1_timage.size[0] + symbol1_timage.size[0] + 7)
for each_team2 in golf_standings2_teams:
symbol2_timage = self.textImage('|', small_font, r=0, g=255, b=0)
img.paste(symbol2_timage, (x_offset2 + 5, 9))
golf_standings2_timage = self.textImage(each_team2, small_font, r=255, g=255, b=255)
img.paste(golf_standings2_timage, (x_offset2 + symbol2_timage.size[0] + 7, 9))
x_offset2 += (golf_standings2_timage.size[0] + symbol2_timage.size[0] + 7)
if x_offset >= x_offset2: if x_offset >= x_offset2:
x_offset += (buff_size - 10) x_offset += (buff_size - 10)
else: else: