api caller bugfix

This commit is contained in:
Your Name 2021-12-21 10:11:49 +00:00
parent 339523046d
commit bbd40b2160
2 changed files with 16 additions and 2 deletions

View File

@ -681,12 +681,13 @@ if __name__ == '__main__':
try: try:
while True: while True:
if msg == 'A':
updateAll()
NY_time = datetime.now(NY_zone).replace(tzinfo=None) NY_time = datetime.now(NY_zone).replace(tzinfo=None)
msg = getInput() msg = getInput()
if msg == 'A':
updateAll()
#stocks #stocks
stock_time = datetime.strptime(last_updates['stocks'], "%d/%m/%Y %H:%M:%S") stock_time = datetime.strptime(last_updates['stocks'], "%d/%m/%Y %H:%M:%S")

View File

@ -2532,8 +2532,21 @@ class StockTicker():
GIFs.append(GIF) GIFs.append(GIF)
else: else:
frames = []
for i, frame in enumerate(ImageSequence.Iterator(GIF)):
frame.thumbnail((99999, 32))
frames.append(frame)
frames[0].save('./display_images/working_gif.gif', save_all=True, append_images=frames[1:], loop=0, optimize = False)
GIF = Image.open('./display_images/working_gif.gif')
GIFs.append(GIF) GIFs.append(GIF)
except Exception as e: except Exception as e:
exc_type, exc_obj, exc_tb = sys.exc_info() exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]