From f854d3765fb2cd862c55d124aa496fb503eb101e Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Thu, 2 Oct 2025 13:15:31 +0200 Subject: [PATCH] random? --- radioPlayer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radioPlayer.py b/radioPlayer.py index 405ef89..4dd9f93 100644 --- a/radioPlayer.py +++ b/radioPlayer.py @@ -239,13 +239,14 @@ def play_playlist(playlist_path, custom_playlist: bool=False, do_shuffle=True): if do_shuffle: random.seed() - for _ in range(random.randrange(1,10)): random.shuffle(lines) + random.shuffle(lines) playlist: list[tuple[str, bool, bool, bool]] = [] # name, fade in, fade out, official last_jingiel = True for line in lines: if line.startswith(";") or not line.strip(): continue tr = [f for f in glob.glob(line) if os.path.isfile(f)] + if do_shuffle: random.shuffle(tr) for track2 in tr: if not last_jingiel and random.choice([False, True, False, False]) and JINGIEL_FILE: playlist.append((track2, True, False, True))