logos for getsectorimage

This commit is contained in:
Justin 2023-08-15 16:16:17 +08:00 committed by GitHub
parent a5e5abefbf
commit ffc4db6184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6963,8 +6963,8 @@ class StockTicker():
midFrame = self.textToImage(ticker, current, arrow, percent_change, point_change) #IMAGE THE TEXT
if sector_settings['logos']:
try:
logos_path = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logos'), 'stocks')
logo = self.openImage(os.path.join(logos_path, ticker + '.png'))
logos_path = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logos'), 'sector')
logo = self.openImage(os.path.join(logos_path, category + '.png'))
stitchedStock = self.stitchImage([logo,midFrame])
except Exception as e:
stitchedStock = midFrame