diff --git a/modules/write_playlists.py b/modules/write_playlists.py index f68e249..bd2beaa 100644 --- a/modules/write_playlists.py +++ b/modules/write_playlists.py @@ -12,10 +12,11 @@ class Module(PlayerModule): self.playlist = [] def on_new_playlist(self, playlist: list[Track]): self.playlist = [str(t.path.absolute()) for t in playlist] - def on_new_track(self, index: int, track: Track, next_track: Track | None): + def progress(self, index: int, track: Track, elapsed: float, total: float, real_total: float) -> None: if os.path.exists("/tmp/radioPlayer_skip"): self._imc.send(self, "procman", {"op": 2}) os.remove("/tmp/radioPlayer_skip") + def on_new_track(self, index: int, track: Track, next_track: Track | None): if next_track: logger.info("Next up:", next_track.path.name) if str(track.path) != self.playlist[index]: # discrepancy, which means that the playing file was modified by the active modifier @@ -30,4 +31,4 @@ class Module(PlayerModule): print(line.encode('utf-8', errors='ignore').decode('utf-8')) raise -module = Module() \ No newline at end of file +module = Module()