diff --git a/modules/scheduling/fallback_manager.py b/modules/scheduling/fallback_manager.py index 1d5300caa783f94a0d0037f3d75d02c86bd8f0ff..9dd32bd455b7b2707450079e18e2adf9800c2b05 100644 --- a/modules/scheduling/fallback_manager.py +++ b/modules/scheduling/fallback_manager.py @@ -126,8 +126,8 @@ class FallbackManager: file = "" self.logger.critical("Should set next fallback file for " + fallbackname + ", but this fallback is unknown!") - # Send admin email to notify about the fallback state if file: + # Send admin email to notify about the fallback state if not active_playlist: active_playlist = "n/a" msg = "AURA ENGINE %s FALLBACK DETECTED!\n\n" % fallbackname @@ -136,13 +136,20 @@ class FallbackManager: msg += "Providing FALLBACK-%s for %s '%s'\n\n" % (media_type, fallbackname, file) msg += "Please review the schedules or contact your Aura Engine administrator." self.mailer.send_admin_mail("CRITICAL - Detected fallback for %s" % fallbackname, msg) - self.logger.critical("Sent admin email:\n──────────────────────────────────────\n" + msg) + self.logger.warn("Providing fallback %s: '%s'. Sent admin email about fallback state" % (media_type, file)) self.is_processing = False return file + def fallback_has_started(self, artist, title): + """ + Called when a fallback track has actually started playing + """ + self.logger.info("Now playing: fallback track '%s - %s'." % (artist, title)) + + # # PRIVATE METHODS #