diff --git a/src/scheduling/calendar.py b/src/scheduling/calendar.py index dd27b6a99e2f6cb2a9c23fde77b1aa5eee57a276..cffa096180f3b7f99e7d9b6a7e55fdc51995f20d 100644 --- a/src/scheduling/calendar.py +++ b/src/scheduling/calendar.py @@ -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: