print with flush replace sys

This commit is contained in:
localhost_frssoft 2023-06-15 17:42:03 +03:00
parent 4c5cb88a61
commit 38212d29b4

View File

@ -9,7 +9,6 @@ from loguru import logger
from shlex import quote
import threading
import time
import sys
fzf = FzfPrompt()
@ -94,8 +93,7 @@ def radio_generator(radio_session_id):
player.playlist_current_pos
if playlist_remaining <= 2:
radio_get_track(radio_session_id)
sys.stdout.write('\rRadio generator stopped')
sys.stdout.flush()
print('\rRadio generator stopped', flush=True)
radio_event_gen = threading.Event()