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

update modules

This commit is contained in:
KubaPro010
2025-11-06 15:49:04 +01:00
parent cc46766e6c
commit 1183da1b0d
7 changed files with 20 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
from . import ActiveModifier, log95, Track, InterModuleCommunication
from . import ActiveModifier, log95, Track, Path
import os, glob, datetime
from .advisor import MORNING_START, DAY_END
@@ -29,6 +29,8 @@ class Module(ActiveModifier):
if song.startswith("!"):
song = song[1:]
official = False # NOT FLOATINGPOINTERROR
song = Path(song).absolute()
if self.last_track: last_track_to_fade_out = self.last_track.fade_out
else:
@@ -46,7 +48,7 @@ class Module(ActiveModifier):
f.write('\n'.join(songs))
f.write("\n")
logger.info(f"Playing {song} instead, as instructed by toplay")
logger.info(f"Playing {song.name} instead, as instructed by toplay")
self.last_track = Track(song, next_track_to_fade_in, last_track_to_fade_out, official, {})
return self.last_track, True