Skip to content
Snippets Groups Projects
Verified Commit 1c0dd740 authored by Ole Binder's avatar Ole Binder
Browse files

Chore: catch any ValueError for metadata

parent d7f0ea9c
No related branches found
No related tags found
1 merge request!46Steering playout schema and virtual timeslot integration
......@@ -313,19 +313,23 @@ class ResourceUtil(Enum):
# FIXME: do we need to convert to int here?
# if type is UNSET (which comes from the api schema) catch exception and log error
annotations = {
"show_name": str(timeslot.get_show().name),
"show_id": int(timeslot.get_show().id),
"timeslot_id": int(timeslot.id),
"playlist_id": int(playlist.id),
"playlist_item": str(float(item.get_position())),
"track_type": int(content_class.numeric),
"track_start": "",
"track_duration": -1,
"track_title": "",
"track_album": "",
"track_artist": "",
}
try:
annotations = {
"show_name": str(timeslot.get_show().name),
"show_id": int(timeslot.get_show().id),
"timeslot_id": timeslot.id,
"playlist_id": int(playlist.id),
"playlist_item": str(float(item.get_position())),
"track_type": int(content_class.numeric),
"track_start": "",
"track_duration": -1,
"track_title": "",
"track_album": "",
"track_artist": "",
}
except ValueError as ve:
# FIXME: should we retry with default values?
raise ve
if assign_track_start:
# Convert to current Liquidsoap date/time format
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment