From 4a8f5aae73c6830c4887b74777e5b2a8d27b53a5 Mon Sep 17 00:00:00 2001 From: Kuba <132459354+KubaPro010@users.noreply.github.com> Date: Mon, 13 Oct 2025 20:26:00 +0200 Subject: [PATCH] actual fix --- modules/active_modifier.py | 4 ++-- radioPlayer.py | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/active_modifier.py b/modules/active_modifier.py index 3173bad..0134af9 100644 --- a/modules/active_modifier.py +++ b/modules/active_modifier.py @@ -39,9 +39,9 @@ class Module(ActiveModifier): logger.info(f"Playing {song} instead, as instructed by toplay") - return (song, last_track_to_fade_out, next_track_to_fade_in, True, {}), True + return song, last_track_to_fade_out, next_track_to_fade_in, True, {} elif len(self.originals): - return self.originals.pop(0), False + return self.originals.pop(0) return track activemod = Module() \ No newline at end of file diff --git a/radioPlayer.py b/radioPlayer.py index c3a9d5c..7922596 100644 --- a/radioPlayer.py +++ b/radioPlayer.py @@ -35,7 +35,7 @@ class ActiveModifier: """ This changes the next song to be played live, which means that this picks the next song, not the playlist, but this is affected by the playlist """ - def play(self, index:int, track: tuple[str, bool, bool, bool, dict[str, str]]): return track, False + def play(self, index:int, track: tuple[str, bool, bool, bool, dict[str, str]]): return track def on_new_playlist(self, playlist: list[tuple[str, bool, bool, bool, dict[str, str]]]): pass simple_modules: list[PlayerModule] = [] @@ -227,11 +227,13 @@ def play_playlist(playlist_path): procman.wait_all() return - track_tuple = playlist[i] + old_track_tuple = playlist[i] if active_modifier: - track_tuple, to_max = active_modifier.play(i, track_tuple) + track_tuple = active_modifier.play(i, old_track_tuple) modified = True - if to_max: max_iterator += 1 + if old_track_tuple != track_tuple: + max_iterator += 1 + modified = True else: modified = False track, to_fade_in, to_fade_out, official, args = track_tuple