diff --git a/handle_imported_video.py b/handle_imported_video.py index 57fd2c8..377c64a 100644 --- a/handle_imported_video.py +++ b/handle_imported_video.py @@ -192,6 +192,8 @@ if _ACTION == "join": # with tqdm(total=100, position=1, desc="Convert") as pbar: # for progress in ff.run_command_with_progress(): # pbar.update(progress - pbar.n) + + cur_stat = 0 with tqdm(total=100, position=1, desc="Join") as pbar: position=0 while proc.returncode is None: @@ -216,6 +218,13 @@ if _ACTION == "join": file_stats = os.stat(export_name) print(f"Exported size: {str(file_stats.st_size )}") print(f"Expected size: {final_size}") + if cur_stat < 99: + print("Something is wrong") + if final_size + 1000000 < final_size: + print("Something is wrong") + else: + print("Size OK") + print("\r\n",end='',flush=True) print(f"\rProcess finished with rc: {proc.returncode}",end='',flush=True) # get the output