fixed percent point change bug for getmarketimage
This commit is contained in:
parent
0307cd9d23
commit
fada23f80b
@ -6480,11 +6480,6 @@ class StockTicker():
|
||||
losers_info = market_settings['losers']
|
||||
losers_symbols = list(losers_info.keys())
|
||||
|
||||
if not market_settings['percent']:
|
||||
percent_change = False
|
||||
if not market_settings['point']:
|
||||
point_change = False
|
||||
|
||||
for category in market_settings['categories']:
|
||||
if category == 'Most Active':
|
||||
most_active = self.openImage('logos/active.png')
|
||||
@ -6498,6 +6493,10 @@ class StockTicker():
|
||||
percent_change = '%.2f' % abs(float(info['percent_change'])) + '%'
|
||||
point_change = '%.2f' % abs(change)
|
||||
current = '%.2f' % float(info['current']) #TEXT
|
||||
if not market_settings['percent']:
|
||||
percent_change = False
|
||||
if not market_settings['point']:
|
||||
point_change = False
|
||||
midFrame = self.textToImage(ticker, current, arrow, percent_change, point_change) #IMAGE THE TEXT
|
||||
if market_settings['logos']:
|
||||
try:
|
||||
@ -6559,6 +6558,10 @@ class StockTicker():
|
||||
percent_change = '%.2f' % abs(float(info['percent_change'])) + '%'
|
||||
point_change = '%.2f' % abs(change)
|
||||
current = '%.2f' % float(info['current']) #TEXT
|
||||
if not market_settings['percent']:
|
||||
percent_change = False
|
||||
if not market_settings['point']:
|
||||
point_change = False
|
||||
midFrame = self.textToImage(ticker, current, arrow, percent_change, point_change) #IMAGE THE TEXT
|
||||
if market_settings['logos']:
|
||||
try:
|
||||
@ -6620,6 +6623,10 @@ class StockTicker():
|
||||
percent_change = '%.2f' % abs(float(info['percent_change'])) + '%'
|
||||
point_change = '%.2f' % abs(change)
|
||||
current = '%.2f' % float(info['current']) #TEXT
|
||||
if not market_settings['percent']:
|
||||
percent_change = False
|
||||
if not market_settings['point']:
|
||||
point_change = False
|
||||
midFrame = self.textToImage(ticker, current, arrow, percent_change, point_change) #IMAGE THE TEXT
|
||||
if market_settings['logos']:
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user