0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-26 21:53:54 +01:00

use the lock everywhere

This commit is contained in:
2025-12-09 19:46:41 +01:00
parent b8201f53d2
commit 3423a0426e

View File

@@ -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")