diff --git a/modules/scheduling/calendar.py b/modules/scheduling/calendar.py index 189b86fdc1bc6b30d5ca81991201b375f23dea71..073a1b88f649ab05550c6b551e066e25bc21ca3a 100644 --- a/modules/scheduling/calendar.py +++ b/modules/scheduling/calendar.py @@ -154,7 +154,7 @@ class AuraCalendarService(threading.Thread): self.queue.put(result) except Exception as e: # Release the mutex - self.logger.warning("Fetching aborted due to: %s" % str(e)) + self.logger.warning("Fetching aborted due to: %s" % str(e), e) self.queue.put("fetching_aborted " + str(e)) # terminate the thread @@ -255,10 +255,9 @@ class AuraCalendarService(threading.Thread): entry_db.artificial_playlist_id = playlist_db.artificial_id entry_db.entry_num = entry_num - if "file" in entry and duration in entry["file"]: + if "file" in entry and "duration" in entry["file"]: # Convert nano-seconds to seconds duration = int(float(entry["file"]["duration"]) / 1000000000) - # except Exception: else: # No duration means it's playing until the end of the schedule self.logger.debug("Missing duration - setting duration of entry to end-of-schedule")