diff --git a/api_caller.py b/api_caller.py index bbf102a..42335bf 100755 --- a/api_caller.py +++ b/api_caller.py @@ -681,12 +681,13 @@ if __name__ == '__main__': try: while True: - if msg == 'A': - updateAll() + NY_time = datetime.now(NY_zone).replace(tzinfo=None) msg = getInput() + if msg == 'A': + updateAll() #stocks stock_time = datetime.strptime(last_updates['stocks'], "%d/%m/%Y %H:%M:%S") diff --git a/stockTicker.py b/stockTicker.py index a0991a2..bad9935 100755 --- a/stockTicker.py +++ b/stockTicker.py @@ -2532,8 +2532,21 @@ class StockTicker(): GIFs.append(GIF) 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) + + except Exception as e: exc_type, exc_obj, exc_tb = sys.exc_info() fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]