diff --git a/modules/base/models.py b/modules/base/models.py index 5939a4cc77e0b65dea52d7ddf4d799c780c6abb1..ec44fe72e93d79e97e0328cb63ea1d4f154e4618 100644 --- a/modules/base/models.py +++ b/modules/base/models.py @@ -429,8 +429,9 @@ class PlaylistEntry(DB.Model, AuraDatabaseModel): duration = Column(BigInteger) source = Column(String(1024)) entry_start = Column(DateTime) - queue_state = None # Assigned when entry is about to be queued + entry_start_actual = None # Assigned when the entry is actually played channel = None # Assigned when entry is actually played + queue_state = None # Assigned when entry is about to be queued status = None # Assigned when state changes switchtimer = None diff --git a/modules/core/events.py b/modules/core/events.py index b202d0730fcfa9e10349c27aebc81dcdbd2e07b5..3cec5c26d63bf003c7fc8f03829a69a1bd893996 100644 --- a/modules/core/events.py +++ b/modules/core/events.py @@ -18,6 +18,7 @@ import logging +import datetime from modules.base.utils import SimpleUtil as SU from modules.base.exceptions import NoActiveEntryException @@ -183,6 +184,8 @@ class EngineEventDispatcher(): else: entry = source + # Assign timestamp for play time + entry.entry_start_actual = datetime.datetime.now() self.call_event("on_play", entry)