From 2eeb2ad6b2e1fe9334e01eab95e5fefe7a32746f Mon Sep 17 00:00:00 2001
From: David Trattnig <david@subsquare.at>
Date: Thu, 14 Mar 2024 20:56:04 +0100
Subject: [PATCH] docs: add info on possible improvement

---
 src/aura_engine/engine.py | 5 +++++
 src/aura_engine/events.py | 3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/aura_engine/engine.py b/src/aura_engine/engine.py
index c8716eec..bf38e299 100644
--- a/src/aura_engine/engine.py
+++ b/src/aura_engine/engine.py
@@ -390,6 +390,11 @@ class Player:
             queue (Boolean): If `True` the item is queued if the `ChannelType` does allow so;
                 otherwise a new channel of the same type is activated
 
+        TODO The command `item.play.set_playing()` sets the playlist item's status to _playing_
+        and assigns the current play start time. This is required for resource like line-in.
+        Other source like audio files have their start marker natively assigned by Liquidsoap.
+        These timestamp represent the actual real start time and should somehow be retrieved
+        from Liquidsoap, in order to also have the _real deal_ in Engine.
         """
         with suppress(CoreConnectionError):
             # Stop any active channel
diff --git a/src/aura_engine/events.py b/src/aura_engine/events.py
index cc5237dc..f3c9f9c2 100644
--- a/src/aura_engine/events.py
+++ b/src/aura_engine/events.py
@@ -23,7 +23,6 @@ Event binding and propagation.
 
 from __future__ import annotations
 
-import datetime
 import logging
 from threading import Thread
 
@@ -222,8 +221,6 @@ class EngineEventDispatcher:
 
         def func(self, item: PlaylistItem):
             self.logger.debug("on_play(..)")
-            # Assign timestamp indicating start play time. Use the actual playtime when possible.
-            item.play_start_time = datetime.datetime.now()
             self.call_event("on_play", item)
 
         thread = Thread(target=func, args=(self, item))
-- 
GitLab