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

Call clock service methods. #6

parent c7204f51
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,8 @@ def clock_info(): # noqa: E501
:rtype: ClockInfo
"""
return 'do some magic!'
service = current_app.config['SERVICE']
return service.get_clock_info()
def get_active_source(): # noqa: E501
......@@ -140,14 +141,17 @@ def set_active_source(number): # noqa: E501
return service.set_active_source(number)
def set_clock_info(number): # noqa: E501
def set_clock_info(body): # noqa: E501
"""Set current studio clock information such as schedule info and track-list for engine 1 or 2
Set current studio clock information (schedule and track-list) of the given play-out source (engine1, engine2) # noqa: E501
Set current studio clock information (source, schedule and track-list) and the next schedule of the given play-out source (engine1, engine2). Please note, the `current_track` information is ignored in the PUT request. It's only populated in the GET request. To store current track information use `/playlog/store` instead. # noqa: E501
:param number: Number of the engine
:type number: int
:param body:
:type body: dict | bytes
:rtype: None
"""
return 'do some magic!'
if connexion.request.is_json:
body = ClockInfo.from_dict(connexion.request.get_json()) # noqa: E501
service = current_app.config['SERVICE']
return service.set_clock_info(body)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment