fixed trailing zeros for crypto
This commit is contained in:
parent
2534f18495
commit
3d7da19b3c
@ -1025,8 +1025,17 @@ class StockTicker():
|
||||
arrow, change = self.getArrow(point_change)
|
||||
|
||||
percent_change = '%.2f' % abs(percent_change) + '%'
|
||||
point_change = str(point_changefinal)
|
||||
current = str(current_final)
|
||||
num3 = point_changefinal.split('.')
|
||||
if len(num3[1]) <= 1:
|
||||
point_change = '%.2f' % float(point_changefinal)
|
||||
else:
|
||||
point_change = str(point_changefinal)
|
||||
|
||||
num2 = current_final.split('.')
|
||||
if len(num2[1]) <= 1:
|
||||
current = '%.2f' % float(current_final)
|
||||
else:
|
||||
current = str(current_final)
|
||||
|
||||
if not all_crypto_settings['percent']:
|
||||
percent_change = False
|
||||
@ -1189,9 +1198,18 @@ class StockTicker():
|
||||
# convert percent to points
|
||||
change = '%.2f' % abs(float(coin_info[cb]['percent_change'])) + '%'
|
||||
else:
|
||||
change = str(changefinal)
|
||||
num3 = changefinal.split('.')
|
||||
if len(num3[1]) <= 1:
|
||||
change = '%.2f' % float(changefinal)
|
||||
else:
|
||||
change = str(changefinal)
|
||||
|
||||
num2 = current_final.split('.')
|
||||
if len(num2[1]) <= 1:
|
||||
current = '%.2f' % float(current_final)
|
||||
else:
|
||||
current = str(current_final)
|
||||
|
||||
current = str(current_final)
|
||||
midFrame = self.textToImageProf(ticker + '(' + base + ')', current, change, arrow, font=ImageFont.load("./fonts/6x10.pil")) #IMAGE THE TEXT
|
||||
if all_crypto_settings['logos']:
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user