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

move skip to playview and dump progrss to file

This commit is contained in:
KubaPro010
2025-11-08 15:09:33 +01:00
parent 6628e6b78b
commit 84e152cbb9
2 changed files with 9 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
from . import PlayerModule, log95, Track, Path
from . import PlayerModule, log95, Track
import os
logger = log95.log95("PlayView")
@@ -8,6 +9,9 @@ class Module(PlayerModule):
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):
if os.path.exists("/tmp/radioPlayer_skip"):
self._imc.send(self, "procman", {"op": 2})
os.remove("/tmp/radioPlayer_skip")
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