From f3c6575b79d82ba0b9a0548cee49d3df50e72559 Mon Sep 17 00:00:00 2001 From: Justin Date: Mon, 9 Jan 2023 19:14:28 +0800 Subject: [PATCH] Update stockTicker.py --- stockTicker.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/stockTicker.py b/stockTicker.py index 413d383..df0f55e 100755 --- a/stockTicker.py +++ b/stockTicker.py @@ -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)