0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-26 21:53:54 +01:00
This commit is contained in:
Kuba
2025-10-13 20:03:36 +02:00
parent e7d661bb3a
commit e78e547552

View File

@@ -5,7 +5,11 @@ class ActiveModifier:
"""Tuple consists of the track path, to fade out, fade in, official, and args"""
def play(self, index: int, track: tuple[str, bool, bool, bool, dict[str, str]]): return track
def on_new_playlist(self, playlist: list[tuple[str, bool, bool, bool, dict[str, str]]]): pass
import os
import os, log95
logger = log95.log95("AC-MOD")
class Module(ActiveModifier):
def __init__(self) -> None:
self.playlist = None
@@ -33,6 +37,8 @@ class Module(ActiveModifier):
with open("/tmp/radioPlayer_toplay", "w") as f: f.write('\n'.join(songs))
logger.info(f"Playing {song} instead, as instructed by toplay")
return song, last_track_to_fade_out, next_track_to_fade_in, True, {}
elif len(self.originals):
return self.originals.pop(0)