Skip to content
Snippets Groups Projects
Commit 4ac00f1b authored by David Trattnig's avatar David Trattnig
Browse files

refactor: use class as playlists container

parent 73072b61
No related branches found
No related tags found
1 merge request!35ORM-less scheduling
......@@ -200,9 +200,34 @@ class Playlist:
return s
Playlists = NamedTuple(
"Playlists", [("timeslot", Playlist), ("schedule", Playlist), ("show", Playlist)]
)
class Playlists:
"""
Container to hold all timeslot assignable types of playlists.
Attributes:
timeslot (Playlist): The playlist assigned on timeslot level.
schedule (Playlist): The playlist assigned on schedule level.
show (Playlist): The playlist assigned on show level.
"""
timeslot: Playlist
schedule: Playlist
show: Playlist
def __init__(self, timeslot: Playlist, schedule: Playlist, show: Playlist):
"""
Initialize.
Args:
timeslot (Playlist): The playlist assigned on timeslot level.
schedule (Playlist): The playlist assigned on schedule level.
show (Playlist): The playlist assigned on show level.
"""
self.timeslot = timeslot
self.schedule = schedule
self.show = show
Show = NamedTuple(
"Show",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment