Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AURA
engine-api
Commits
3d301163
Commit
3d301163
authored
Nov 25, 2020
by
david
Browse files
Init current playlogs. engine-clock#11
parent
23958212
Pipeline
#892
passed with stages
in 3 minutes and 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/models.py
View file @
3d301163
...
...
@@ -483,6 +483,8 @@ class ClockInfo(db.Model):
playlogs
=
PlayLog
.
select_for_timeslot
(
most_recent_track
.
timeslot_id
)
playlogs
.
sort
(
key
=
lambda
track
:
track
.
track_start
,
reverse
=
False
)
info
[
"current_playlogs"
]
=
playlog_schema
.
dump
(
playlogs
)
if
info
[
"current_playlogs"
]
==
None
:
info
[
"current_playlogs"
]
=
{}
# Invalid timeslots (e.g. in fallback scenarios) get a virtual start date of the first fallback track
if
info
[
"current_timeslot"
][
"timeslot_id"
]
==
-
1
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment