display top 10 or 20 golfer prof
This commit is contained in:
parent
f538730758
commit
39ad5ee59a
@ -3410,7 +3410,7 @@ class StockTicker():
|
||||
imgs = [title_img, self.blank]
|
||||
else:
|
||||
imgs = []
|
||||
|
||||
ten_or_twenty = slice(None)
|
||||
for league in leagues:
|
||||
try:
|
||||
x_offset = 0
|
||||
@ -3419,10 +3419,25 @@ class StockTicker():
|
||||
|
||||
if league == 'PGA':
|
||||
league_logo = Image.open('logos/sports/league_logos/pga_1.png').convert('RGB')
|
||||
try:
|
||||
if all_settings['top20'] == 10:
|
||||
ten_or_twenty = slice(10)
|
||||
else:
|
||||
ten_or_twenty = slice(None)
|
||||
except:
|
||||
ten_or_twenty = slice(None)
|
||||
elif league == 'LPGA':
|
||||
league_logo = Image.open('logos/sports/league_logos/lpga_1.png').convert('RGB')
|
||||
try:
|
||||
if all_settings['top20'] == 10:
|
||||
ten_or_twenty = slice(10)
|
||||
else:
|
||||
ten_or_twenty = slice(None)
|
||||
except:
|
||||
ten_or_twenty = slice(None)
|
||||
else:
|
||||
league_logo = Image.open('logos/sports/league_logos/{}.png'.format(league)).convert('RGB')
|
||||
ten_or_twenty = slice(None)
|
||||
width, height = league_logo.size
|
||||
league_logo2 = league_logo.resize((int(width/2), int(height/2)))
|
||||
img.paste(league_logo2, (x_offset,0))
|
||||
@ -3438,7 +3453,7 @@ class StockTicker():
|
||||
|
||||
buff_size = 20
|
||||
|
||||
for team in team_info:
|
||||
for team in team_info[ten_or_twenty]:
|
||||
if league == 'PGA' or league =='LPGA':
|
||||
pga_small = ImageFont.load("./fonts/4x6.pil")
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user