You've already forked RadioPlayer
mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-02-27 06:03:52 +01:00
logger
This commit is contained in:
@@ -5,7 +5,11 @@ class ActiveModifier:
|
|||||||
"""Tuple consists of the track path, to fade out, fade in, official, and args"""
|
"""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 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
|
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):
|
class Module(ActiveModifier):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.playlist = None
|
self.playlist = None
|
||||||
@@ -33,6 +37,8 @@ class Module(ActiveModifier):
|
|||||||
|
|
||||||
with open("/tmp/radioPlayer_toplay", "w") as f: f.write('\n'.join(songs))
|
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, {}
|
return song, last_track_to_fade_out, next_track_to_fade_in, True, {}
|
||||||
elif len(self.originals):
|
elif len(self.originals):
|
||||||
return self.originals.pop(0)
|
return self.originals.pop(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user