From 388d9841b62e6b04f756ac60de6b313cdbf0d493 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Sun, 1 Jun 2025 16:48:48 +0200 Subject: [PATCH] use another epoch for random --- radioPlayer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/radioPlayer.py b/radioPlayer.py index b58b114..eac3043 100644 --- a/radioPlayer.py +++ b/radioPlayer.py @@ -99,7 +99,7 @@ def play_playlist(playlist_path, play_newest_first=False): time.sleep(15) return - random.seed(time.time()-1744118482) + random.seed(time.time_ns()-1748789305527928867) if play_newest_first: newest_track = get_newest_track(tracks) if newest_track: @@ -156,9 +156,9 @@ def main(): if arg.lower() == "n": play_newest_first = True print("Newest song will be played first") - elif os.path.isfile(os.path.join(playlist_dir, arg)): - pre_track_path = os.path.join(playlist_dir, arg) - print(f"Will play requested song first: {os.path.basename(pre_track_path)}") + elif os.path.isfile(arg): + pre_track_path = arg + print(f"Will play requested song first: {arg}") else: print(f"Invalid argument or file not found: {arg}")