Commit 48dc589b authored by David Trattnig's avatar David Trattnig
Browse files

Store when an entry is actually playing.

parent 95dad62d
......@@ -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
......
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment