You've already forked RadioPlayer
mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-02-26 21:53:54 +01:00
fix
This commit is contained in:
@@ -12,10 +12,11 @@ class Module(PlayerModule):
|
|||||||
self.playlist = []
|
self.playlist = []
|
||||||
def on_new_playlist(self, playlist: list[Track]):
|
def on_new_playlist(self, playlist: list[Track]):
|
||||||
self.playlist = [str(t.path.absolute()) for t in playlist]
|
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"):
|
if os.path.exists("/tmp/radioPlayer_skip"):
|
||||||
self._imc.send(self, "procman", {"op": 2})
|
self._imc.send(self, "procman", {"op": 2})
|
||||||
os.remove("/tmp/radioPlayer_skip")
|
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 next_track: logger.info("Next up:", next_track.path.name)
|
||||||
if str(track.path) != self.playlist[index]:
|
if str(track.path) != self.playlist[index]:
|
||||||
# discrepancy, which means that the playing file was modified by the active modifier
|
# 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'))
|
print(line.encode('utf-8', errors='ignore').decode('utf-8'))
|
||||||
raise
|
raise
|
||||||
|
|
||||||
module = Module()
|
module = Module()
|
||||||
|
|||||||
Reference in New Issue
Block a user