Skip to content
Snippets Groups Projects
Commit fbfd6ccb authored by David Trattnig's avatar David Trattnig
Browse files

Refact(log): Add more info, remove obsolete code

parent 195d7ea7
No related branches found
No related tags found
No related merge requests found
......@@ -145,9 +145,8 @@ class AuraScheduler(threading.Thread):
if entry.channel in ChannelType.FALLBACK_QUEUE.channels:
return
current_timeslot = self.programme.get_current_timeslot()
if current_timeslot:
current_timeslot.set_active_entry(entry)
# Nothing to do atm
#
# METHODS
......@@ -446,11 +445,12 @@ class TimeslotCommand(EngineExecutor):
f"Fading out timeslot in {start_fade_out} seconds at {SU.fmt_time(timeslot.end_unix - fade_out_time)} | Timeslot: {timeslot}"
)
# Initialize the "fade in" EngineExecuter and instantiate a connected child EngineExecuter for "fade out" when the parent is ready
timeslot_id = timeslot.timeslot_id
super().__init__(
"TIMESLOT", None, timeslot.start_unix, self.do_start_timeslot, timeslot
f"TIMESLOT#{timeslot_id}", None, timeslot.start_unix, self.do_start_timeslot, timeslot
)
EngineExecutor(
"TIMESLOT",
f"TIMESLOT#{timeslot_id}",
self,
timeslot.end_unix - fade_out_time,
self.do_end_timeslot,
......@@ -502,10 +502,11 @@ class PlayCommand(EngineExecutor):
start_preload = entries[0].start_unix - preload_offset
start_play = entries[0].start_unix
msg = f"Preloading entries at {SU.fmt_time(start_preload)}, {preload_offset} seconds before playing it at {SU.fmt_time(start_play)}"
self.logger.debug(msg)
self.logger.info(msg)
# Initialize the "preload" EngineExecuter and attach a child `PlayCommand` to the "on_ready" event handler
super().__init__("PRELOAD", None, start_preload, self.do_preload, entries)
EngineExecutor("PLAY", self, start_play, self.do_play, entries)
timeslot_id = entries[0].playlist.timeslot.timeslot_id
super().__init__(f"PRELOAD#{timeslot_id}", None, start_preload, self.do_preload, entries)
EngineExecutor(f"PLAY#{timeslot_id}", self, start_play, self.do_play, entries)
def do_preload(self, entries):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment