From 08269fe42b271e5474b7949af9e2050b0476b050 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Sun, 6 Jul 2025 19:20:11 +0200 Subject: [PATCH] disable ffplay output --- radioPlayer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/radioPlayer.py b/radioPlayer.py index 99fb736..990c04f 100644 --- a/radioPlayer.py +++ b/radioPlayer.py @@ -145,7 +145,8 @@ def play_playlist(playlist_path, play_newest_first=False): print(f"Now playing: {track_name}") update_rds(track_name) - subprocess.run(['ffplay', '-nodisp', '-stats', '-hide_banner', '-autoexit', track_path]) + subprocess.run(['ffplay', '-nodisp', '-hide_banner', '-autoexit', '-loglevel', 'quiet', track_path], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + if can_delete_file("/tmp/radioPlayer_quit"): os.remove("/tmp/radioPlayer_quit") exit() @@ -184,7 +185,7 @@ def main(): track_name = os.path.basename(pre_track_path) print(f"Now playing: {track_name}") update_rds(track_name) - subprocess.run(['ffplay', '-nodisp', '-stats', '-hide_banner', '-autoexit', pre_track_path]) + subprocess.run(['ffplay', '-nodisp', '-hide_banner', '-autoexit', '-loglevel', 'quiet', pre_track_path], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) if can_delete_file("/tmp/radioPlayer_quit"): os.remove("/tmp/radioPlayer_quit") exit()