Update stockTicker.py

This commit is contained in:
Justin 2023-01-09 19:14:28 +08:00 committed by GitHub
parent a91efddf73
commit f3c6575b79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2143,14 +2143,14 @@ class StockTicker():
img.paste(hc_timage, (main_offset - int(vs_timage.size[0]/2) - hc_timage.size[0], 9))
img.paste(score_image, (main_offset - int(score_image.size[0]/2), 15))
if match['isLive'] == 'post':
if intHomeScore > intAwayScore or intHomeScore == intAwayScore:
if int(intHomeScore) > int(intAwayScore) or int(intHomeScore) == int(intAwayScore):
u_image = Image.new("RGB", (hc_timage.size[0] -2, 1))
u_image1 = ImageDraw.Draw(u_image)
u_image1.line((0,0,hc_timage.size[0]-2,0), fill="red", width = 0)
img.paste(u_image, (main_offset - int(vs_timage.size[0]/2)-hc_timage.size[0], hc_timage.size[1]+7))
img.paste(ac_timage, (main_offset + int(vs_timage.size[0]/2),9))
if match['isLive'] == 'post':
if intHomeScore < intAwayScore or intHomeScore == intAwayScore:
if int(intHomeScore) < int(intAwayScore) or int(intHomeScore) == int(intAwayScore):
ua_image = Image.new("RGB", (ac_timage.size[0] -2, 1))
ua_image1 = ImageDraw.Draw(ua_image)
ua_image1.line((0,0,ac_timage.size[0]-2,0), fill="red", width = 0)
@ -2376,13 +2376,13 @@ class StockTicker():
img.paste(vs_timage,(main_offset - int(vs_timage.size[0]/2),10))
img.paste(hc_timage, (main_offset - int(vs_timage.size[0]/2) - hc_timage.size[0], 9))
img.paste(score_image, (main_offset - int(score_image.size[0]/2), 15))
if intHomeScore > intAwayScore or intHomeScore == intAwayScore:
if int(intHomeScore) > int(intAwayScore) or int(intHomeScore) == int(intAwayScore):
u_image = Image.new("RGB", (hc_timage.size[0] -2, 1))
u_image1 = ImageDraw.Draw(u_image)
u_image1.line((0,0,hc_timage.size[0]-2,0), fill="red", width = 0)
img.paste(u_image, (main_offset - int(vs_timage.size[0]/2)-hc_timage.size[0], hc_timage.size[1]+7))
img.paste(ac_timage, (main_offset + int(vs_timage.size[0]/2),9))
if intHomeScore < intAwayScore or intHomeScore == intAwayScore:
if int(intHomeScore) < int(intAwayScore) or int(intHomeScore) == int(intAwayScore):
ua_image = Image.new("RGB", (ac_timage.size[0] -2, 1))
ua_image1 = ImageDraw.Draw(ua_image)
ua_image1.line((0,0,ac_timage.size[0]-2,0), fill="red", width = 0)
@ -2767,7 +2767,7 @@ class StockTicker():
x_offset += date_timage.size[0]
img.paste(hc_timage,(x_offset10, 5))
if match['isLive'] == 'post':
if intHomeScore > intAwayScore or intHomeScore == intAwayScore:
if int(intHomeScore) > int(intAwayScore) or int(intHomeScore) == int(intAwayScore):
u_image = Image.new("RGB", (hc_timage.size[0] -3, 1))
u_image1 = ImageDraw.Draw(u_image)
u_image1.line((0,0,hc_timage.size[0]-3,0), fill="red", width = 0)
@ -2775,7 +2775,7 @@ class StockTicker():
x_offset10 += hc_timage.size[0] + score_image.size[0]
img.paste(ac_timage,(x_offset10, 5))
if match['isLive'] == 'post':
if intHomeScore < intAwayScore or intHomeScore == intAwayScore:
if int(intHomeScore) < int(intAwayScore) or int(intHomeScore) == int(intAwayScore):
ua_image = Image.new("RGB", (ac_timage.size[0] -3, 1))
ua_image1 = ImageDraw.Draw(ua_image)
ua_image1.line((0,0,ac_timage.size[0]-3,0), fill="red", width = 0)
@ -2796,7 +2796,7 @@ class StockTicker():
img.paste(hc_timage, (x_offset, 5))
if match['isLive'] == 'post':
if intHomeScore > intAwayScore or intHomeScore == intAwayScore:
if int(intHomeScore) > int(intAwayScore) or int(intHomeScore) == int(intAwayScore):
u_image = Image.new("RGB", (hc_timage.size[0] -3, 1))
u_image1 = ImageDraw.Draw(u_image)
u_image1.line((0,0,hc_timage.size[0]-3,0), fill="red", width = 0)
@ -2807,7 +2807,7 @@ class StockTicker():
x_offset += score_image.size[0]
img.paste(ac_timage, (x_offset, 5))
if match['isLive'] == 'post':
if intHomeScore < intAwayScore or intHomeScore == intAwayScore:
if int(intHomeScore) < int(intAwayScore) or int(intHomeScore) == int(intAwayScore):
ua_image = Image.new("RGB", (ac_timage.size[0] -3, 1))
ua_image1 = ImageDraw.Draw(ua_image)
ua_image1.line((0,0,ac_timage.size[0]-3,0), fill="red", width = 0)
@ -3045,7 +3045,7 @@ class StockTicker():
x_offsetdate2 += date_timage.size[0]
#img.paste(date_timage, (x_offset+20+int((score_image.size[0] - date_timage.size[0])/2),0))
img.paste(hc_timage, (x_offset, 5))
if intHomeScore > intAwayScore or intHomeScore == intAwayScore:
if int(intHomeScore) > int(intAwayScore) or int(intHomeScore) == int(intAwayScore):
u_image = Image.new("RGB", (hc_timage.size[0] -3, 1))
u_image1 = ImageDraw.Draw(u_image)
u_image1.line((0,0,hc_timage.size[0]-3,0), fill="red", width = 0)
@ -3054,7 +3054,7 @@ class StockTicker():
img.paste(score_image, (x_offset, 5))
x_offset += score_image.size[0]
img.paste(ac_timage, (x_offset, 5))
if intHomeScore < intAwayScore or intHomeScore == intAwayScore:
if int(intHomeScore) < int(intAwayScore) or int(intHomeScore) == int(intAwayScore):
ua_image = Image.new("RGB", (ac_timage.size[0] -3, 1))
ua_image1 = ImageDraw.Draw(ua_image)
ua_image1.line((0,0,ac_timage.size[0]-3,0), fill="red", width = 0)