From 3423a0426e636f60e6ffbf756785adb6ffc9c6b5 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Tue, 9 Dec 2025 19:46:41 +0100 Subject: [PATCH] use the lock everywhere --- modules/active_modifier.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/active_modifier.py b/modules/active_modifier.py index ed71dfb..b0b938b 100644 --- a/modules/active_modifier.py +++ b/modules/active_modifier.py @@ -61,9 +61,10 @@ class Module(ActiveModifier): if not self.originals or self.originals[-1] != track: self.originals.append(track) - with open("/tmp/radioPlayer_toplay", "w") as f: - f.write('\n'.join(songs)) - f.write("\n") + with self.file_lock: + with open("/tmp/radioPlayer_toplay", "w") as f: + f.write('\n'.join(songs)) + f.write("\n") logger.info(f"Playing {song.name} instead, as instructed by toplay")