diff --git a/src/rest/controllers/public_controller.py b/src/rest/controllers/public_controller.py index 275939a5bc990c3948492498db2669d1c1f2e632..b04c95e1d93731cd9150e667550174aec9776124 100644 --- a/src/rest/controllers/public_controller.py +++ b/src/rest/controllers/public_controller.py @@ -1,12 +1,11 @@ + +import datetime import connexion import six from src.rest.models.play_log_entry import PlayLogEntry # noqa: E501 from src.rest import util -from src.server import track_service - - def current_track(): # noqa: E501 """Get current track @@ -16,7 +15,8 @@ def current_track(): # noqa: E501 :rtype: PlayLogEntry """ - return track_service.current_track() + from src.server import service + return service.current_track() def list_tracks(offset=None, limit=None): # noqa: E501 @@ -31,4 +31,5 @@ def list_tracks(offset=None, limit=None): # noqa: E501 :rtype: List[PlayLogEntry] """ - return track_service.list_tracks(offset, limit) + from src.server import service + return service.list_tracks(offset, limit) \ No newline at end of file diff --git a/src/rest/models/schedule.py b/src/rest/models/schedule.py index 7b839c524825107c2abae0aaebb3f9fba049e7d6..c5eaab3fe5b0809d57d45ea298f81328efd90374 100644 --- a/src/rest/models/schedule.py +++ b/src/rest/models/schedule.py @@ -15,7 +15,7 @@ class Schedule(Model): Do not edit the class manually. """ - def __init__(self, show_name=None, schedule_id=None, schedule_start=None, schedule_end=None, playlist_id=None, fallback_type=None, entries=None): # noqa: E501 + def __init__(self, show_name=None, schedule_id=None, schedule_start=None, schedule_end=None, playlist_id=None, fallback_type=None, playlist_entries=None): # noqa: E501 """Schedule - a model defined in Swagger :param show_name: The show_name of this Schedule. # noqa: E501 @@ -30,8 +30,8 @@ class Schedule(Model): :type playlist_id: int :param fallback_type: The fallback_type of this Schedule. # noqa: E501 :type fallback_type: int - :param entries: The entries of this Schedule. # noqa: E501 - :type entries: List[PlaylistEntry] + :param playlist_entries: The playlist_entries of this Schedule. # noqa: E501 + :type playlist_entries: List[PlaylistEntry] """ self.swagger_types = { 'show_name': str, @@ -40,7 +40,7 @@ class Schedule(Model): 'schedule_end': datetime, 'playlist_id': int, 'fallback_type': int, - 'entries': List[PlaylistEntry] + 'playlist_entries': List[PlaylistEntry] } self.attribute_map = { @@ -50,7 +50,7 @@ class Schedule(Model): 'schedule_end': 'schedule_end', 'playlist_id': 'playlist_id', 'fallback_type': 'fallback_type', - 'entries': 'entries' + 'playlist_entries': 'playlist_entries' } self._show_name = show_name self._schedule_id = schedule_id @@ -58,7 +58,7 @@ class Schedule(Model): self._schedule_end = schedule_end self._playlist_id = playlist_id self._fallback_type = fallback_type - self._entries = entries + self._playlist_entries = playlist_entries @classmethod def from_dict(cls, dikt): @@ -204,22 +204,24 @@ class Schedule(Model): self._fallback_type = fallback_type @property - def entries(self): - """Gets the entries of this Schedule. + def playlist_entries(self): + """Gets the playlist_entries of this Schedule. - :return: The entries of this Schedule. + :return: The playlist_entries of this Schedule. :rtype: List[PlaylistEntry] """ - return self._entries + return self._playlist_entries - @entries.setter - def entries(self, entries): - """Sets the entries of this Schedule. + @playlist_entries.setter + def playlist_entries(self, playlist_entries): + """Sets the playlist_entries of this Schedule. - :param entries: The entries of this Schedule. - :type entries: List[PlaylistEntry] + :param playlist_entries: The playlist_entries of this Schedule. + :type playlist_entries: List[PlaylistEntry] """ + if playlist_entries is None: + raise ValueError("Invalid value for `playlist_entries`, must not be `None`") # noqa: E501 - self._entries = entries + self._playlist_entries = playlist_entries