fixed progress bar overflow

This commit is contained in:
Jonas_Jones 2023-09-13 00:44:57 +02:00
parent 85edae7c3c
commit fa58cd5893

View file

@ -16,6 +16,7 @@ SPOTIPY_REDIRECT_URI = ""
LIKEDSONGPLAYLIST_ID = "" LIKEDSONGPLAYLIST_ID = ""
def progress_bar(current, total, last_time_stamp=time.time()): def progress_bar(current, total, last_time_stamp=time.time()):
current = total if current > total else current
this_timestamp = time.time() this_timestamp = time.time()
width = os.get_terminal_size().columns width = os.get_terminal_size().columns
progress = round((current/total)*width) progress = round((current/total)*width)