Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine
Commits
1adfdcd3
Commit
1adfdcd3
authored
4 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
Fixed schedule fallback assignment.
#50
parent
8cef76cb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scheduling/calendar.py
+3
-14
3 additions, 14 deletions
src/scheduling/calendar.py
with
3 additions
and
14 deletions
src/scheduling/calendar.py
+
3
−
14
View file @
1adfdcd3
...
...
@@ -141,22 +141,13 @@ class AuraCalendarService(threading.Thread):
# Store playlists to play
self
.
store_playlist
(
timeslot_db
,
timeslot_db
.
playlist_id
,
timeslot
[
"
playlist
"
])
if
timeslot_db
.
timeslot
_fallback_id
:
self
.
store_playlist
(
timeslot_db
,
timeslot_db
.
timeslot
_fallback_id
,
timeslot
[
"
timeslot
_fallback
"
])
if
timeslot_db
.
schedule
_fallback_id
:
self
.
store_playlist
(
timeslot_db
,
timeslot_db
.
schedule
_fallback_id
,
timeslot
[
"
schedule
_fallback
"
])
if
timeslot_db
.
show_fallback_id
:
self
.
store_playlist
(
timeslot_db
,
timeslot_db
.
show_fallback_id
,
timeslot
[
"
show_fallback
"
])
if
timeslot_db
.
station_fallback_id
:
self
.
store_playlist
(
timeslot_db
,
timeslot_db
.
station_fallback_id
,
timeslot
[
"
station_fallback
"
])
# self.store_playlist(timeslot_db, timeslot_db.playlist_id, timeslot["playlist"], PlaylistType.DEFAULT.id)
# if timeslot_db.timeslot_fallback_id:
# self.store_playlist(timeslot_db, timeslot_db.timeslot_fallback_id, timeslot["timeslot_fallback"], PlaylistType.TIMESLOT.id)
# if timeslot_db.show_fallback_id:
# self.store_playlist(timeslot_db, timeslot_db.show_fallback_id, timeslot["show_fallback"], PlaylistType.SHOW.id)
# if timeslot_db.station_fallback_id:
# self.store_playlist(timeslot_db, timeslot_db.station_fallback_id, timeslot["station_fallback"], PlaylistType.STATION.id)
result
.
append
(
timeslot_db
)
# Release the mutex
...
...
@@ -202,7 +193,7 @@ class AuraCalendarService(threading.Thread):
timeslot_db
.
musicfocus
=
timeslot
[
"
show_musicfocus
"
]
timeslot_db
.
playlist_id
=
timeslot
[
"
playlist_id
"
]
timeslot_db
.
timeslot
_fallback_id
=
timeslot
[
"
timeslot
_fallback_id
"
]
timeslot_db
.
schedule
_fallback_id
=
timeslot
[
"
schedule
_fallback_id
"
]
timeslot_db
.
show_fallback_id
=
timeslot
[
"
show_fallback_id
"
]
timeslot_db
.
station_fallback_id
=
timeslot
[
"
station_fallback_id
"
]
...
...
@@ -219,7 +210,6 @@ class AuraCalendarService(threading.Thread):
"""
if
not
playlist_id
or
not
fetched_playlist
:
self
.
logger
.
debug
(
f
"
Playlist ID#
{
playlist_id
}
is not available!
"
)
# self.logger.debug("Playlist type %s with ID '%s' is not available!" % (fallbackplaylist_type, playlist_id))
return
playlist_db
=
Playlist
.
select_playlist_for_timeslot
(
timeslot_db
.
timeslot_start
,
playlist_id
)
...
...
@@ -233,7 +223,6 @@ class AuraCalendarService(threading.Thread):
playlist_db
.
playlist_id
=
playlist_id
playlist_db
.
timeslot_start
=
timeslot_db
.
timeslot_start
playlist_db
.
show_name
=
timeslot_db
.
show_name
# playlist_db.fallback_type = fallbackplaylist_type
if
"
entries
"
in
fetched_playlist
:
playlist_db
.
entry_count
=
len
(
fetched_playlist
[
"
entries
"
])
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment