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

Persistence of fallback playlists.

parent ad1769e7
No related branches found
No related tags found
No related merge requests found
...@@ -106,7 +106,11 @@ class CalendarFetcher: ...@@ -106,7 +106,11 @@ class CalendarFetcher:
if "end" not in schedule: if "end" not in schedule:
self.logger.warning("No end of schedule given. Skipping schedule: " + str(schedule)) self.logger.warning("No end of schedule given. Skipping schedule: " + str(schedule))
schedule = None schedule = None
if "playlist" not in schedule: if "playlist" not in schedule \
and "show_fallback" not in schedule \
and "schedule_fallback" not in schedule \
and "station_fallback" not in schedule:
self.logger.warning("No playlist for schedule given. Skipping schedule: " + str(schedule)) self.logger.warning("No playlist for schedule given. Skipping schedule: " + str(schedule))
schedule = None schedule = None
...@@ -207,7 +211,8 @@ class CalendarFetcher: ...@@ -207,7 +211,8 @@ class CalendarFetcher:
# If Steering doesn't provide a station fallback, the local one is used # If Steering doesn't provide a station fallback, the local one is used
if not schedule["station_fallback"] and int(local_station_fallback_id) > 0: if not schedule["station_fallback"] and int(local_station_fallback_id) > 0:
schedule["station_fallback"] = self.__fetch_schedule_playlist__(schedule, local_station_fallback_id, fetched_entries) schedule["station_fallback_id"] = local_station_fallback_id
schedule["station_fallback"] = self.__fetch_schedule_playlist__(schedule, local_station_fallback_id, fetched_entries)
if schedule["station_fallback"]: if schedule["station_fallback"]:
self.logger.info("Assigned playlist #%s as local station fallback" % local_station_fallback_id) self.logger.info("Assigned playlist #%s as local station fallback" % local_station_fallback_id)
......
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