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