0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-26 13:52:00 +01:00
This commit is contained in:
2025-11-11 18:06:49 +01:00
parent 7e69d5eef9
commit 76325d0dfa

View File

@@ -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()
module = Module()